Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a completed upstart conf file loaded here: http://pastebin.com/5E7J5jEY but I'm having trouble with the upstart not executing the exec function and/or relinquishing the kernel console CLI back to me.

after executing : sudo start itc_d I get nothing back (no startup status or even a usable cursor). If I use ctrl+c and run the command again I get: start: Job is already running: itc_d

Can someone help me understand what I am doing wrong? Perhaps something in my upstart config is wrong, or perhaps my python's createDaemon() function is not forking as expected? How can I fix/troubleshoot this issue?

F.Y.I - The file the upstart is attempting to execute is a python script that daemonizes itself (process forks twice) within the first function. If you would like to see the python script here it is: http://pastebin.com/xLHEhg14 (the createDaemon() function is the one in question here)

share|improve this question
add comment

2 Answers 2

Try removing the expect daemon line from your upstart conf file.

I know it's supposed to be there according to the docs, but from my recent experience with python daemons (I'm currently using this one), the fork count isn't incremented from python and so it will just hang.

share|improve this answer
add comment

Something like:

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/local/bin/python-daemon -- --app-options

No expect, just set the variables with env, start and stop levels, and then this exec.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.