=== hidgw is now known as dgw === marcoceppi is now known as marcoceppi-mobil === marcoceppi-mobil is now known as marcoceppi === marcoceppi is now known as marco-traveling [15:30] I have a "post-start exec" to check my process is fully up. Can "post-start exec" stop my service if it doesn't come up in say, 60 seconds? [15:32] Ztyx: loop/wait the check for 60s in post-start, exit non-zero. that will stop the service. [15:33] Ztyx: see (probably the most convoluted way to do so) in http://paste.ubuntu.com/7120379/ [15:38] Could anyone please tell how to set upstart env with result of shell command? [15:38] something like env DATE=$(date) [15:38] xnox: Thanks for give me a push in the right direction. My exec application most certainly exits with 1. I even added a sleep in it just to make sure this wasn't a timing issue. Will I need to use a "post-exec script" for this? [15:39] gena2x: is this for a system job, or a session job? [15:39] jodh, system job [15:40] gena2x: in which case there isn't really a good way. Either define DATE in your script sections (all of them that need to use $DATE!) or have each script section source /etc/default/myservice. [15:40] Also, will I need to reload upstart if I make changes to /etc/init/? [15:41] jodh, got it, thank you [15:41] gena2x: alternatively, have another job emit an event ('initctl emit my-event DATE=... hello=world') that your job can 'start on' and thus get the value of that event's variables. [15:41] Ztyx: configs are re-read automatically, but they are applied against /newly/ started jobs only. E.g. if the job is running, you'd need to do: stop myjob; start myjob => for changes to take effect. [15:42] Ztyx: it's not "post-exec" but rather "post-start" =) so you can do: post-start exec sleep 60; run-my-check [15:43] Ztyx: that means it will always take 60s to start, the check would run, and if check exits 0 -> all is good your job is started. Otherwise the job will stop. [15:44] jodh, ty once again, will put into script section, thats most clear solution in my case. [15:46] xnox: see any errors in this https://gist.github.com/JensRantil/9644545 Seem like it should shut down my application after 10 seconds, right? [15:50] Originally, I tried this https://gist.github.com/JensRantil/9644643 but after looking at the mysql.conf I tried the "post-start script" version. [15:56] Ztyx: correct, but you have set it to respawn. thus it just respawns again. [15:57] Ztyx: if you want "exit 1" to stop it, and abort respawns, then you should do "stop; exit 1" [15:57] Ztyx: see cookbook. [15:57] Ztyx: or if you are testing, comment out the respawn / respawn limit [16:01] xnox: I see. Goodo to know! [16:15] xnox: Still seem to be running when I try this: https://gist.github.com/JensRantil/9644545 [16:16] The only difference from previously is that I added "stop". [16:27] The cookbook contains examples for this for pre-start, but I can't find anything like this for post-start. Also, I've tried both "exit 1" and "exit 2" since http://paste.ubuntu.com/7120379/ seem to use both. Still nothing. [16:36] Anyone else with some input as to why my application isn't stopped? Is this supported? [19:14] I would like to start a program after pulseaudio is started. there is not upstart script for pulseaudio but only a script in /etc/init.d/ does that also get monitored and if so what should be the condition for the on start entry?