[17:45] <skrode_> hi, has anyone here managed to get nginx work with upstart?
[17:45] <skrode_> i'm using this script: http://pastebin.com/DFVLDRCZ. it works fine unless if i kill the master process using kill command
[17:46] <skrode_> after killing it with kill command the pid keeps changing every few seconds
[17:55] <gansbrest> hi. I need to run a service only after mount is done, ie all volumes defined in fstab were mounted
[17:55] <gansbrest> how would I do it with upstart
[18:02] <xnox> skrode_: after starting it for the first time. Does the pid of the master process match the one in `status nginx` ?
[18:02] <SpamapS> gansbrest: start on filesystem
[18:02] <SpamapS> gansbrest: but really, unless it is very special, just do 'start on runlevel [2345]'
[18:03] <SpamapS> gansbrest: and stop on runlevel [016]
[18:03] <gansbrest> I do start on runlevel now, but noticed that my startup happens before volume was mounted
[18:03] <SpamapS> gansbrest: runlevel what?
[18:03] <gansbrest> is that even possible that 0123 would execute before mount..?
[18:04] <SpamapS> gansbrest: runlevel 2 is 'start on filesystem and static-networking-up' .. so .. 
[18:04] <gansbrest> my runlevel is 3
[18:04] <SpamapS> gansbrest: why 3?
[18:04] <SpamapS> oh, RH I bet
[18:04] <gansbrest> yes, centos
[18:04] <SpamapS> gansbrest: check /etc/init/rc-sysinit.conf
[18:04] <SpamapS> gansbrest: what is the 'start on' there ?
[18:05] <gansbrest> hm, I don't have this file
[18:05] <SpamapS> oh wow
[18:05]  * SpamapS is checking his own centos test box
[18:05] <skrode_> xnox: yes it does
[18:05] <SpamapS> the way its done is..
[18:05] <SpamapS> really weird
[18:06] <gansbrest> I think upstart starts systemV right?
[18:06] <gansbrest> for comparability 
[18:06] <SpamapS> gansbrest: yeah but.. the way its being done is.. really broken IMO
[18:07] <SpamapS> no wonder lennart got frustrated and wrote systemd
[18:07] <gansbrest> do you know which init script runs mounts?
[18:07] <SpamapS> I have no idea
[18:08] <gansbrest> I'm wondering if it's systemV script or upstart one )
[18:09] <gansbrest> if it would be systemV - then I could do "start on stopped rc"
[18:09] <SpamapS> gansbrest: rc.sysinit does a lot of mount stuff
[18:09] <SpamapS> gansbrest: yes start on stopped rc RUNLEVEL=3 would do it
[18:10] <gansbrest> but theoretically runlevel 3 should come up with mounts..? 
[18:10] <skrode_> xnox: the pid of the master process matches always the one in `status nginx`, but the /var/run/nginx.pid doesn't update after killing the master process with kill command
[18:22] <SpamapS> gansbrest: yes it should
[18:23] <gansbrest> ah, I think my problem could be related to nework mount
[18:23] <gansbrest> forgot to mention it
[18:23] <gansbrest> it's not normal mount
[18:23] <gansbrest> ntf sort of thing
[18:31] <SpamapS> gansbrest: those are done by sysv
[18:35] <gansbrest> yes, on stopped rc worked, thanks SpamapS
[23:34] <FRITZ|FRITZ> hello
[23:35] <FRITZ|FRITZ> so i was trying to create an upstart job on Ubuntu that would call "openvpn /home/roland/AirVPN_United\ States_UDP-443.ovpn" as root
[23:36] <FRITZ|FRITZ> i created a job as launchvpn.conf which is in the /etc/init/ folder. it is not executable as per the instructions
[23:37] <FRITZ|FRITZ> # launchvpn - service job file
[23:37] <FRITZ|FRITZ> description "Launch VPN"
[23:37] <FRITZ|FRITZ> author "FRITZ|FRITZ"
[23:37] <FRITZ|FRITZ> # Start the media server after network and filesystem
[23:37] <FRITZ|FRITZ> # Otherwise this lead to a unresponsive server
[23:37] <FRITZ|FRITZ> start on filesystem and net-device-up IFACE!=lo
[23:38] <FRITZ|FRITZ> echo "test"
[23:38] <FRITZ|FRITZ> # When to stop the service
[23:38] <FRITZ|FRITZ> stop on runlevel [016]
[23:38] <FRITZ|FRITZ> # Automatically restart process if crashed
[23:38] <FRITZ|FRITZ> respawn
[23:38] <FRITZ|FRITZ> # Sets nice and ionice level for job
[23:38] <FRITZ|FRITZ> nice -5
[23:38] <FRITZ|FRITZ> # What to execute
[23:38] <FRITZ|FRITZ> script
[23:38] <FRITZ|FRITZ>         openvpn /home/roland/AirVPN_United\ States_UDP-443.ovpn
[23:38] <FRITZ|FRITZ> end script
[23:38] <SpamapS> FRITZ|FRITZ: in the future, please paste these things into a pastebin, such as paste.ubuntu.com
[23:39] <SpamapS> FRITZ|FRITZ: "start on filesystem and net-device-up IFACE!=lo" is not what you want. You want 'start on runlevel [2345]'
[23:40] <SpamapS> FRITZ|FRITZ: echo "test" is also wrong
[23:40] <SpamapS> FRITZ|FRITZ: you don't need the 'script/end script', just do 'exec .....'
[23:41] <FRITZ|FRITZ> let me give it a shot thanks
[23:41] <SpamapS> FRITZ|FRITZ: finally you probably want to use the keyword 'task' , as this is a one time thing, not a constantly running job
[23:41] <FRITZ|FRITZ> well the vpn connection I do want to have constantly…
[23:43] <SpamapS> FRITZ|FRITZ: ah ok, then not task :)
[23:44] <SpamapS> FRITZ|FRITZ: note that openvpn already has sysvinit scripts that will do this for you
[23:45] <SpamapS> FRITZ|FRITZ: you just have to put the config file in /etc/openvpn/whatever.conf
[23:47] <FRITZ|FRITZ> hmm it still does not seem to be executing properly… if i were to run sudo openvpn /home/roland/AirVPN_United\ States_UDP-443.ovpn once logged into my user account it would work… (but remain in the foreground)
[23:48] <FRITZ|FRITZ> how come the upstart job doesn't seem to work?
[23:51] <SpamapS> FRITZ|FRITZ: not sure, but check /var/log/upstart/name-of-your-job.log
[23:53] <FRITZ|FRITZ> ahh usefull
[23:54] <SpamapS> FRITZ|FRITZ: but, like I said, probably just toss that file in /etc/openvpn/airvpn.conf and it will work
[23:55] <FRITZ|FRITZ> that's what i was about to try… currently the files are sitting in my home directory. the log showed it unable to find the keys