/srv/irclogs.ubuntu.com/2013/08/09/#upstart.txt

scathen^Chey all can you use upstart on debian 7?07:03
vanguarde9Hey guys I need a hint , i want to use some bash scripting in pre start stanza09:08
vanguarde9if I put there command which return 1 09:08
vanguarde9start of upstart service of course fails09:09
vanguarde9what is the recommended way ? to use bash script in pre start stanza ?09:09
vanguarde9something like this http://pastebin.com/H1R9pT3u09:12
vanguarde9ok i have found solution09:41
xnoxvanguarde9: egrep "abc" /etc/hosts && do_some_stuff || true09:44
vanguarde9yes you have right ,  i have found this article http://superuser.com/questions/597549/grep-fails-in-upstart-script09:59
vanguarde9It would be great if this info was in FAQ10:00
vanguarde9however thanks ;)10:01
xnoxvanguarde9: it's in the cookbook.10:03
xnoxvanguarde9: http://upstart.ubuntu.com/cookbook/10:03
xnoxvanguarde9: all scripts are running with equivalent of $ set -e10:04
crankharderhow do I deal with a process that is expected to 1) maintain its own pid file that's always up to date 2) spawns replacements for itself and dies off19:57
crankharderbasically, my process is doing the above, but upstart thinks it's died, since the original process is gone, so it spawns another process19:57
crankharderthat all said, I *do* want upstart to spawn a new process if the PID represented in the pid file isn't running19:57
crankharderit also doesn't help that I can't set the user a script is run as, instead havint to restort to:  exec su - username -c "..." -- which evidentally counts as one fork20:52
crankharderpretty sure this could all be solved if I were able to just tell upstart the name of the PID file to check for the current PID.  is that possible?20:56
codygmanDoes upstart respect environmental variables set by .bashrc?21:09
codygmanIt seems not to, because I can run a Django site which gets settings from environmental variables in an interactive ssh session but it fails because it doesn't respect the environmental variables in upstart.21:12
codygmanI seem to have found my answer at http://upstart.ubuntu.com/cookbook/#id9421:14
codygmanof course my upstart installation doesn't seem to have commands such as initctl get-env21:14
codygmanRunning upstart '1.5-0ubuntu7.2' on 'Ubuntu 12.04.2 LTS \n \l'21:15

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