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