Wednesday, 15 May 2013

linux - Upstart won't start my job -



linux - Upstart won't start my job -

i'm having hard time figuring out what's wrong script. i'm newcomer linux world may missing trivial. have python script want run daemon when pc starts. want respawn in case of crash. after looking several hours in google, gave :)

here's tried far:

description "some daemon service." #start on startup #stop on shutdown #respawn pre-start exec python3 /home/dato0011/pycharmprojects/untitled/main.py start post-stop exec python3 /home/dato0011/pycharmprojects/untitled/main.py stop

when executing initctl start "svc_name" initctl: job failed start error.

thanks

your command expected go script section, not in pre-start/post-start section. otherwise service won't start @ , wouldn't know pid track respawn etc.

script exec python3 /home/dato011/ppycharmprojects/untitled/main.py start end script

at stop upstart kill process kill. i'm not exclusively sure of how kill way specified running same command different parameter - in case (nodejs) application handles event on exit , cleanup there.

also, don't need utilize initctl start , stop, utilize start , stop commands (i.e. start svc_name)

linux daemon upstart python-daemon

No comments:

Post a Comment