I am attempting to write a python daemon that will launch at boot. The goal of the script is to receive a job from our gearman load balancing server and complete the job. I am using the python-daemon module from pypi (http://pypi.python.org/pypi/python-daemon/). The nature of the job that it is completing is converting images in the orf (olympus raw image format) to jpeg. In order to accomplish this an outside program is used, ufraw in this case. The problem comes in when I start the daemon at boot, if I launch from the shell it runs perfectly and completes the work. When it starts at boot it is unable to launch the subprocess command.
commandString = /usr/bin/ufraw-batch --interpolation=four-color --wb=camera --compression=100 --output=" + outfile + " --out-type=jpg --overwrite " + infile + "
args = shlex.split(commandString)
process = subprocess.Popen(args).wait()
I am not sure what I am doing wrong. Thanks for any help.