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

schnitzlhi guys. i have some problems with upstart.11:37
schnitzlafter adding a scrit to /etc/init11:37
schnitzldo i need to add it to the rc.local lile "start foo" ?11:38
schnitzlor should it start automatically on every reboot when its palced in /etc/init11:38
jodhschnitzl: it auto-starts: http://upstart.ubuntu.com/cookbook/#upstart-s-design-why-it-is-revolutionary11:53
schnitzli 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.html11:56
schnitzlits /etc/init/znc.conf11:56
schnitzlwhen i sudo reboot it does not auto start. :(11:56
jodhschnitzl: run 'init-checkconf /etc/init/yourjob.conf' to check if the syntax is valid.12:29
schnitzlk sec.12:29
schnitzlERROR: failed to ask Upstart to check conf file12:30
schnitzljodh: this means the syntax is broken ?12:53
jYschnitzl: pastebin your conf13:39
schnitzlhttp://pastebin.com/xSyatNqW13:44
jYas root can you su - znc13:47
jYthen as znc run /usr/local/bin/znc --datadir=/var/lib/znc -f13:48
schnitzlso i need a user called znc ?13:50
jYyes13:50
jYthat is what setuid means13:50
schnitzland if i reboot, will it auto start znc ?13:50
jYits runnung that command as that user13:50
jYyes13:50
schnitzlyayyy! :D so znc user is missing. this iwll fix it. 13:51
schnitzlwhich line in the script tells it to run it as user znc ?13:51
jYsetuid13:51
schnitzlbamm finally. thank you! 13:52
schnitzlguess ima kill my bnc now. thanks again :)13:52
* xnox also uses znc =)14:55
rewrittenhello17:52
rewrittencan anyone help me?17:53
rewrittenI'd like to configure a number of similar services (similarly to the typical mongrel cluster)17:53
rewrittenall 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:54
rewrittenso the question is: can I just symlink the conf file to many others, and have each one detect its own name and use it?17:55
benlangfeldGood 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?18:58
xnoxbenlangfeld: can you post your full job?19:14
xnoxbenlangfeld: is that for saucy session init?19:14
benlangfeldxnox: https://gist.github.com/benlangfeld/a5bde3e2ba7991a4939d19:14
benlangfeldI have no idea what you mean :)19:14
xnoxbenlangfeld: $HOME is not set, so "~" doesn't epand to anything.19:15
xnoxbenlangfeld: upstart jobs are executed as root user without $HOME set. without your user-account environment.19:15
benlangfeldxnox: Doesn't make any difference, it's not ending up in PATH in the bin/brain script.19:16
benlangfeldxnox: Expanded or not, it doesn't really matter :)19:16
xnoxbenlangfeld: it does matter. since your PATH is invalid and doesn't even have "start-stop-daemon" on it.19:17
xnox=)19:17
xnoxhence exec not able to find "start-stop-daemon"19:17
benlangfeldxnox: Ok, I'll clear that up and see what happens.19:17
xnoxbenlangfeld: remove env PATH= line, remove export PATH, remove #source line19:18
xnoxbenlangfeld: and instead use19:18
xnoxbenlangfeld: exec PATH=/full/path/to/home/user/.rbenv/shims:$PATH start-stop-daemon .... 19:18
xnoxbenlangfeld: not sure why you make your script so  complicated thought.19:19
benlangfeldWhat's complicated about it?19:19
xnoxbenlangfeld: i left a comment on the gist.19:21
benlangfeldxnox: I thought use of start-stop-daemon was recommended since upstart won't manage PIDs?19:22
xnoxbenlangfeld: it doesn't need PIDs19:22
benlangfeldhmm, ok19:22
xnoxbenlangfeld: 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
xnoxbenlangfeld: i don't know what bin/brain is.19:23
xnoxbenlangfeld: if it forks, add "expect fork". If it daemonises add "expect daemon"19:23
xnoxbenlangfeld: logs are storred in /var/log/upstart/adam-brain.log19:23
xnox(both stdout and stderr)19:23
benlangfeldxnox: Can I configure the log path?19:24
benlangfeldAs for start-stop-daemon, it's pretty much everywhere you google about upstart config :)19:24
benlangfeldFor example here: http://stackoverflow.com/questions/9972023/ubuntu-upstart-and-creating-a-pid-for-monitoring19:25
benlangfeldI updated the gist. The job no longer validates (upstart's error in that case is awful btw)19:26
xnoxbenlangfeld: no, log path is not configurable. you can configger one with e.g. logger19:26
benlangfeldaha, it's setuid19:27
xnoxyeah, sorry.19:28
xnox$ init-checkconf adam-brain.conf19:28
xnoxERROR: File adam-brain.conf: syntax invalid:19:28
xnoxinit:adam-brain.conf:9: Unknown stanza19:28
xnox$ init-checkconf adam-brain.conf19:28
xnoxFile adam-brain.conf: syntax ok19:28
xnoxwith setuid.19:28
benlangfeldIt still doesn't like having PATH after the exec19:30
benlangfeldI think I need to export it19:30
benlangfeldgist updated again, I'm not sure what's going on here19:33
benlangfeldUsing 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.19:42
xnoxbenlangfeld: i thought it would work. Seems to work here if I replace "exec" with "script .. end script"20:19
xnoxbenlangfeld: see new commend20:19
jYhttp://www.buttpaste.com/products/original-butt-paste22:49

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