/srv/irclogs.ubuntu.com/2013/07/19/#upstart.txt

tkdhi, quick question - is there a way to have an upstart job load env vars from a file other than changing the exec to script and actually loading them there?12:34
jodhtkd: for system jobs, not really, but you can do magic with session jobs using 'initctl set-env': http://upstart.ubuntu.com/cookbook/#initctl-set-env13:47
tkdjodh: oh well. will have to change to script then.14:02
jodhtkd: you can set variables using the 'env' stanza of course, but not wholesale from a file.14:03
tkdyeah - this is for a managed deploy where i want to have a static upsart .conf and a separate /etc file with the actual settings14:10
tkdi was hoping i could do something like the systemd EnvironmentFile14:10
jodhtkd: actually, there is a way to do what you want then: create your static foo.conf14:12
jodhtkd: then create foo.override containing multiple 'env $name=$value' lines.14:13
tkdjodh: oh, that sounds pretty good. will check it out14:18
jodhtkd: It's now in the cookbook: http://upstart.ubuntu.com/cookbook/#separating-variables-from-the-job14:32
allaireHi, can somebody explain me why these two are differents: https://gist.github.com/allaire/ab0e4900da999983ff21  the second one, with no `exec` command returns the wrong pid, always the pid just before the correct one14:42
allaireAlso, is the way I handle the pid in a file correct? I was curious how it was possible to know the pid ($$) before actually running the exec command14:43
jodhallaire: please read http://upstart.ubuntu.com/cookbook/#expect14:44
allairejodh: In my case I have both a script and an exec, I guess it takes the last one it encounter? Thanks for the link by the way14:46
jodhallaire: the correct one is probably the one with the 'exec'. Note that *that* exec is a shell keyword, not the upstart exec stanza :)15:05
allairejodh: Yes that the correct one (the one with the exec). I thought it was the upstart exec, now I'm lost :(15:07
jodhallaire: when upstart sees a "script ... end-script" block, it runs it via /bin/sh. exec is a shell builting (see man sh / help exec).15:09
allairefrom the man page, it's the same as running "./myscript", but how come I get a different pid depending of if I use it or not?15:12
jodhallaire: no, it isn't - exec *replaces* the current shell process with the command you run.15:17
jodhallaire: try logging in on a console and running "false". this just returns 1. Now try running "exec false" and see how it logs you out?15:18
allaireyea15:19
allaireI seee15:19
allaireso even if I have the "$$" var before the exec, it takes oveer the current shell process and that's why it has the right pid?15:20
allairebecause $$ don't return the same thing if I have exec and if I don't15:21
=== yulimoto is now known as yulimoto_away

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!