/srv/irclogs.ubuntu.com/2010/05/21/#upstart.txt

mshadlei am trying to create an upstart script... and can't figure out why this one in paritcular doesnt work09:23
sazwhat does it do?09:23
mshadlethe command is this:09:24
mshadle /usr/local/bin/php-cgi --fpm --fpm-config /etc/php-fpm.conf09:24
mshadlethat's it. it daemonizes itself by default09:24
mshadleif i run it on the command line it works like a charm. but inside of a basic upstart script with exec /usr/local/bin/php-cgi --fpm --fpm-config /etc/php-fpm.conf it doesnt work09:24
mshadlei tried adding & for kicks.. i tried fork, respawn, task 09:25
saztried it minus the 'exec'?09:26
mshadledoesn't seem to do anything09:27
sazhave you got the output going to the console?09:28
mshadleno.. 09:28
sazif so, use xconsole to check for any messages09:28
sazconsole output <- add that line to your script09:28
mshadleim downstairs right now. i'll have to go up and look.09:30
sazif you've got an ssh session, you can just run xconsole09:30
mshadlehere i'll let you examine this09:33
mshadlehttp://pastebin.com/z0B2uV7e09:33
sazwhere is your script/end-script ?09:40
sazer09:41
sazs/-//09:41
sazyou shouldn't need to fork or the exec09:41
mshadlewell, does i matter if it is daemonized or not ?09:43
sazI have no idea09:44
sazbut I'd try putting script and end script around it09:44
mshadle /etc/init/php-fpm.conf:12: Unknown stanza09:44
saz?09:45
mshadlethat's the line without exec prefixing it09:45
mshadlelet's try the script09:45
mshadleno change :/09:45
sazhttp://pastebin.com/fsmKJNw009:46
sazsomething like that09:47
sazI'm not a guru on this, I've only started playing with upstart yesterday09:47
mshadleyeah nothing seems to b e working09:48
sazI would try replacing your call to the php program with 09:49
sazecho "hello world"09:49
sazand see if you see hello world in your xconsole09:49
sazand take it from there09:49
mshadleyeah i just did touch /tmp/php-fpm and nothing09:50
mshadlei just made one for nginx, no problem09:50
sazoh wait09:54
saz/etc/init/php-fpm.conf:12: Unknown stanza  <- you need to quote the whole thing09:54
sazhttp://pastebin.com/wSEMYiQ309:55
saztry that09:55
sazor maybe that with exec in front of it09:55
mshadlenope.09:55
mshadleyou do need exec09:55
mshadlei know that for sure09:55
sazis php-cgi a script?09:56
sazI had enormous amounts of trouble with tightvncserver, because it's a script09:56
mshadlenot working.09:56
mshadleno php-cgi is a binary09:56
mshadleand it daemonizes itself09:56
mshadlethere is a script too which could be used but it doesnt work. what worries me is touch /tmp/php-fpm isnt even working09:57
mshadlei see the issue. there is some sort of upstart registry or something that has that job blackballed09:59
mshadlei made a new random named service and it touched the file no problem09:59
mshadleso i bet i have had it working one way.. but it doesn't like my php-fpm service name09:59
sazah10:00
mshadlehah. what do you know. i changed the name of the .conf file and now php-fpm2 works10:01
mshadlebut php-fpm is 'stuck'10:01
mshadlei had the right idea the entire time :p10:01
mshadleproblem is i dont know where the cache/db is10:02
mshadlewe'll try a reboot. i'll be pissed if it gets stuck on that.10:05
mshadleawesome.10:09
inkI'm writing my first init script in upstart; is it sufficient for my script to say 'emits foo' to have that signal to be sent after it's up and running, or do I have send from within the daemon itself?20:59
ink(via some C code or initctl)21:00
sadmacink: you must send it21:21
inkthanks21:21
sadmacink: emits is just for documentation21:21
inkthis script starts xorg:  http://pastebin.com/UfdU1kZ822:04
inkbut `initctl status gui-test` always says stop/waiting22:04
ink(never emits the signal?)22:05
inkor does post-start not fire until the emit...22:09

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