It seems that right after local-fs.target doesn't work. Any idea what prevents it from working early in the boot process?
I found the problem, by manually starting the script after the log in. The camera cable moved a bit and I was getting an error, and for some reason things didn't continue after that. Now it works ok.