[12:34] hi, 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? [13:47] tkd: for system jobs, not really, but you can do magic with session jobs using 'initctl set-env': http://upstart.ubuntu.com/cookbook/#initctl-set-env [14:02] jodh: oh well. will have to change to script then. [14:03] tkd: you can set variables using the 'env' stanza of course, but not wholesale from a file. [14:10] yeah - this is for a managed deploy where i want to have a static upsart .conf and a separate /etc file with the actual settings [14:10] i was hoping i could do something like the systemd EnvironmentFile [14:12] tkd: actually, there is a way to do what you want then: create your static foo.conf [14:13] tkd: then create foo.override containing multiple 'env $name=$value' lines. [14:18] jodh: oh, that sounds pretty good. will check it out [14:32] tkd: It's now in the cookbook: http://upstart.ubuntu.com/cookbook/#separating-variables-from-the-job [14:42] Hi, 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 one [14:43] Also, 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 command [14:44] allaire: please read http://upstart.ubuntu.com/cookbook/#expect [14:46] jodh: 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 way [15:05] allaire: the correct one is probably the one with the 'exec'. Note that *that* exec is a shell keyword, not the upstart exec stanza :) [15:07] jodh: Yes that the correct one (the one with the exec). I thought it was the upstart exec, now I'm lost :( [15:09] allaire: 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:12] from 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:17] allaire: no, it isn't - exec *replaces* the current shell process with the command you run. [15:18] allaire: 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:19] yea [15:19] I seee [15:20] so 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:21] because $$ don't return the same thing if I have exec and if I don't === yulimoto is now known as yulimoto_away