[11:37] hi guys. i have some problems with upstart. [11:37] after adding a scrit to /etc/init [11:38] do i need to add it to the rc.local lile "start foo" ? [11:38] or should it start automatically on every reboot when its palced in /etc/init [11:53] schnitzl: it auto-starts: http://upstart.ubuntu.com/cookbook/#upstart-s-design-why-it-is-revolutionary [11:56] i wonder what i did wrong :( i used a given script for the irc bounder znc. i just copy& pasted it. doesnt work! https://raymii.org/s/tutorials/Install_the_Lastest_ZNC_from_Source_in_Ubuntu.html [11:56] its /etc/init/znc.conf [11:56] when i sudo reboot it does not auto start. :( [12:29] schnitzl: run 'init-checkconf /etc/init/yourjob.conf' to check if the syntax is valid. [12:29] k sec. [12:30] ERROR: failed to ask Upstart to check conf file [12:53] jodh: this means the syntax is broken ? [13:39] schnitzl: pastebin your conf [13:44] http://pastebin.com/xSyatNqW [13:47] as root can you su - znc [13:48] then as znc run /usr/local/bin/znc --datadir=/var/lib/znc -f [13:50] so i need a user called znc ? [13:50] yes [13:50] that is what setuid means [13:50] and if i reboot, will it auto start znc ? [13:50] its runnung that command as that user [13:50] yes [13:51] yayyy! :D so znc user is missing. this iwll fix it. [13:51] which line in the script tells it to run it as user znc ? [13:51] setuid [13:52] bamm finally. thank you! [13:52] guess ima kill my bnc now. thanks again :) [14:55] * xnox also uses znc =) [17:52] hello [17:53] can anyone help me? [17:53] I'd like to configure a number of similar services (similarly to the typical mongrel cluster) [17:54] all the services have the same exec, except for the STOUD redirection. But it may perfectly be related to the name of the script file. [17:55] so the question is: can I just symlink the conf file to many others, and have each one detect its own name and use it? [18:58] Good afternoon guys. I'm having some trouble with Upstart and setting PATH. I'm trying to do this: export PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH, but it looks like maybe $PATH is not being interpolated correctly. What am I doing wrong? [19:14] benlangfeld: can you post your full job? [19:14] benlangfeld: is that for saucy session init? [19:14] xnox: https://gist.github.com/benlangfeld/a5bde3e2ba7991a4939d [19:14] I have no idea what you mean :) [19:15] benlangfeld: $HOME is not set, so "~" doesn't epand to anything. [19:15] benlangfeld: upstart jobs are executed as root user without $HOME set. without your user-account environment. [19:16] xnox: Doesn't make any difference, it's not ending up in PATH in the bin/brain script. [19:16] xnox: Expanded or not, it doesn't really matter :) [19:17] benlangfeld: it does matter. since your PATH is invalid and doesn't even have "start-stop-daemon" on it. [19:17] =) [19:17] hence exec not able to find "start-stop-daemon" [19:17] xnox: Ok, I'll clear that up and see what happens. [19:18] benlangfeld: remove env PATH= line, remove export PATH, remove #source line [19:18] benlangfeld: and instead use [19:18] benlangfeld: exec PATH=/full/path/to/home/user/.rbenv/shims:$PATH start-stop-daemon .... [19:19] benlangfeld: not sure why you make your script so complicated thought. [19:19] What's complicated about it? [19:21] benlangfeld: i left a comment on the gist. [19:22] xnox: I thought use of start-stop-daemon was recommended since upstart won't manage PIDs? [19:22] benlangfeld: it doesn't need PIDs [19:22] hmm, ok [19:23] benlangfeld: start-stop-daemon is discouraged, but so many people cargo cult that from somewhere I really want to know where you find that =) [19:23] benlangfeld: i don't know what bin/brain is. [19:23] benlangfeld: if it forks, add "expect fork". If it daemonises add "expect daemon" [19:23] benlangfeld: logs are storred in /var/log/upstart/adam-brain.log [19:23] (both stdout and stderr) [19:24] xnox: Can I configure the log path? [19:24] As for start-stop-daemon, it's pretty much everywhere you google about upstart config :) [19:25] For example here: http://stackoverflow.com/questions/9972023/ubuntu-upstart-and-creating-a-pid-for-monitoring [19:26] I updated the gist. The job no longer validates (upstart's error in that case is awful btw) [19:26] benlangfeld: no, log path is not configurable. you can configger one with e.g. logger [19:27] aha, it's setuid [19:28] yeah, sorry. [19:28] $ init-checkconf adam-brain.conf [19:28] ERROR: File adam-brain.conf: syntax invalid: [19:28] init:adam-brain.conf:9: Unknown stanza [19:28] $ init-checkconf adam-brain.conf [19:28] File adam-brain.conf: syntax ok [19:28] with setuid. [19:30] It still doesn't like having PATH after the exec [19:30] I think I need to export it [19:33] gist updated again, I'm not sure what's going on here [19:42] Using env and specifying the full path works, it's just the interpolation that doesn't. That'll do for me for now. Thanks for your help xox. [20:19] benlangfeld: i thought it would work. Seems to work here if I replace "exec" with "script .. end script" [20:19] benlangfeld: see new commend [22:49] http://www.buttpaste.com/products/original-butt-paste