=== Md_ is now known as Md
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 command17:45
skrode_after killing it with kill command the pid keeps changing every few seconds17:46
gansbresthi. I need to run a service only after mount is done, ie all volumes defined in fstab were mounted17:55
gansbresthow would I do it with upstart17:55
xnoxskrode_: after starting it for the first time. Does the pid of the master process match the one in `status nginx` ?18:02
SpamapSgansbrest: start on filesystem18:02
SpamapSgansbrest: but really, unless it is very special, just do 'start on runlevel [2345]'18:02
SpamapSgansbrest: and stop on runlevel [016]18:03
gansbrestI do start on runlevel now, but noticed that my startup happens before volume was mounted18:03
SpamapSgansbrest: runlevel what?18:03
gansbrestis that even possible that 0123 would execute before mount..?18:03
SpamapSgansbrest: runlevel 2 is 'start on filesystem and static-networking-up' .. so .. 18:04
gansbrestmy runlevel is 318:04
SpamapSgansbrest: why 3?18:04
SpamapSoh, RH I bet18:04
gansbrestyes, centos18:04
SpamapSgansbrest: check /etc/init/rc-sysinit.conf18:04
SpamapSgansbrest: what is the 'start on' there ?18:04
gansbresthm, I don't have this file18:05
SpamapSoh wow18:05
* SpamapS is checking his own centos test box18:05
skrode_xnox: yes it does18:05
SpamapSthe way its done is..18:05
SpamapSreally weird18:05
gansbrestI think upstart starts systemV right?18:06
gansbrestfor comparability 18:06
SpamapSgansbrest: yeah but.. the way its being done is.. really broken IMO18:06
SpamapSno wonder lennart got frustrated and wrote systemd18:07
gansbrestdo you know which init script runs mounts?18:07
SpamapSI have no idea18:07
gansbrestI'm wondering if it's systemV script or upstart one )18:08
gansbrestif it would be systemV - then I could do "start on stopped rc"18:09
SpamapSgansbrest: rc.sysinit does a lot of mount stuff18:09
SpamapSgansbrest: yes start on stopped rc RUNLEVEL=3 would do it18:09
gansbrestbut 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 command18:10
SpamapSgansbrest: yes it should18:22
gansbrestah, I think my problem could be related to nework mount18:23
gansbrestforgot to mention it18:23
gansbrestit's not normal mount18:23
gansbrestntf sort of thing18:23
SpamapSgansbrest: those are done by sysv18:31
gansbrestyes, on stopped rc worked, thanks SpamapS18:35
FRITZ|FRITZso i was trying to create an upstart job on Ubuntu that would call "openvpn /home/roland/AirVPN_United\ States_UDP-443.ovpn" as root23:35
FRITZ|FRITZi created a job as launchvpn.conf which is in the /etc/init/ folder. it is not executable as per the instructions23:36
FRITZ|FRITZ# launchvpn - service job file23:37
FRITZ|FRITZdescription "Launch VPN"23:37
FRITZ|FRITZ# Start the media server after network and filesystem23:37
FRITZ|FRITZ# Otherwise this lead to a unresponsive server23:37
FRITZ|FRITZstart on filesystem and net-device-up IFACE!=lo23:37
FRITZ|FRITZecho "test"23:38
FRITZ|FRITZ# When to stop the service23:38
FRITZ|FRITZstop on runlevel [016]23:38
FRITZ|FRITZ# Automatically restart process if crashed23:38
FRITZ|FRITZ# Sets nice and ionice level for job23:38
FRITZ|FRITZnice -523:38
FRITZ|FRITZ# What to execute23:38
FRITZ|FRITZ        openvpn /home/roland/AirVPN_United\ States_UDP-443.ovpn23:38
FRITZ|FRITZend script23:38
SpamapSFRITZ|FRITZ: in the future, please paste these things into a pastebin, such as paste.ubuntu.com23:38
SpamapSFRITZ|FRITZ: "start on filesystem and net-device-up IFACE!=lo" is not what you want. You want 'start on runlevel [2345]'23:39
SpamapSFRITZ|FRITZ: echo "test" is also wrong23:40
SpamapSFRITZ|FRITZ: you don't need the 'script/end script', just do 'exec .....'23:40
FRITZ|FRITZlet me give it a shot thanks23:41
SpamapSFRITZ|FRITZ: finally you probably want to use the keyword 'task' , as this is a one time thing, not a constantly running job23:41
FRITZ|FRITZwell the vpn connection I do want to have constantly…23:41
SpamapSFRITZ|FRITZ: ah ok, then not task :)23:43
SpamapSFRITZ|FRITZ: note that openvpn already has sysvinit scripts that will do this for you23:44
SpamapSFRITZ|FRITZ: you just have to put the config file in /etc/openvpn/whatever.conf23:45
FRITZ|FRITZhmm 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:47
FRITZ|FRITZhow come the upstart job doesn't seem to work?23:48
SpamapSFRITZ|FRITZ: not sure, but check /var/log/upstart/name-of-your-job.log23:51
FRITZ|FRITZahh usefull23:53
SpamapSFRITZ|FRITZ: but, like I said, probably just toss that file in /etc/openvpn/airvpn.conf and it will work23:54
FRITZ|FRITZthat's what i was about to try… currently the files are sitting in my home directory. the log showed it unable to find the keys23:55

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