[06:31] hey everyone [06:31] is anyone available for some upstart help? [09:36] hey again, is anyone alive? [17:08] irc is asynchronous - ask away, someone will most likely answer [17:08] oh s/he's gone [18:35] hey [18:45] eran: Just ask your question and wait for answer. Peple are in tens of channels at once often. [18:46] sure, wasn't sure if anyone actually listens [18:47] Don't make me laugh, please. [18:47] I'm running Ubuntu 14.04 with 1.12.1-0ubuntu4.2 [18:48] I'm trying to setup an upstart script that starts a Python script [18:48] 5 lines. Of which, 3 are informational. [18:48] 2 are** [18:48] this Python script runs as a non-root user (it requires some environment settings). [18:49] so I setup a sysV script to start/stop this python script [18:49] Well, add the lines for "non root user" and the environament you need. [18:49] Either way, pastebin your current state. [18:49] ok [18:51] this is my current upstart config file: [18:51] http://pastebin.com/0Yngpsyw [18:52] I can start/stop the service through /etc/init.d [18:52] my question is, how can I start an event after for example an ansible-playbook as finished [18:52] Remove "respawn"… Now. start on - don't you have any better events to start on? [18:52] my ansible-playbook runs on /etc/rc.local [18:53] so I thought started on rc would be the place [18:53] *facepalm* [18:53] :/ [18:53] and why remove respawn? [18:53] When you forget about existence of rc.local already? [18:53] yeah well [18:53] Because you don't have a working script yet. [18:54] oh, ok [18:54] And respawn is a good way to kill your system with a broken upstart. [18:54] job [18:54] good to know [18:54] how would you do it? [18:55] Write upstart jobs for everything of course. [18:55] for both ansible-playbook command and the Python script? [18:55] If you always need to start your script after that ansible thingy, the "start on stopped ansible-whatever" [18:56] Of course. Why such a question ever raised? === JanC is now known as Guest5182 === JanC_ is now known as JanC [18:57] ok, sounds good [18:57] other than that [18:57] If your playbook is a short-living script, then makr it as "task". [18:57] yeah, obviously [18:57] mark* [18:57] thanks a lot, I will try this [18:58] I hope you're here tomorrow [18:58] And avoid wrapping your jobs in a script ... end script, if at all possible. [18:58] Someone will answer, if you ask a question. [18:58] I tried just using exec $DAEMON [18:58] but for some reason it failed starting [18:59] "console log" and look for clues. [18:59] Also http://upstart.ubuntu.com/cookbook/ [18:59] just out of curious, why script/end script is bad? [19:00] Because upstart does not execute these scripts by itself, but call /bin/sh -e -c for that. [19:00] Which means, it does not monitor correct PID from the beginning. [19:01] ok [19:01] which leads me to the last question [19:02] the Python script is a wrapper for a C++ application [19:02] either way it won't know the correct PID, isn't it? [19:02] although I use expect fork, daemon [19:03] So, fork or daemon? [19:03] fork [19:03] As long as it monitoring correct PID in the end, should be fine. [19:04] will give it a try soon. [19:04] I appreciate your time [19:05] While you are "giving it a try", remove expect and respawn, both. [19:05] Or you may get upstart stuck and will need to reboot the box. [19:05] will do! [19:05] thanks for your insight! [19:05] see ya