Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Bug #16980 init.d script doesn't stop daemon
Submitted: 2010-01-08 15:57 UTC
From: martinjanda Assigned: martinjanda
Status: Closed Package: System_Daemon (version 0.9.2)
PHP Version: 5.2.5 OS: Debian Lenny, Linux 2.6.2
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 1 + 11 = ?

 
 [2010-01-08 15:57 UTC] martinjanda (Martin Janda)
Description: ------------ I use System_Daemon 0.9.2 on Debian Lenny, Linux 2.6.2 with php 5.2.9-4. It is really nice work. I have one problem: created init.d script doesn't stop daemon. They do nothing. start parametr work. restart parametr just start daemon. Expected result: ---------------- I would like stop my daemon with generate init.d script

Comments

 [2010-01-08 16:14 UTC] kvz (Kevin van Zonneveld)
-Status: Open +Status: Feedback
I'm suspecting there is an issue with your PID file; since you also created a feature request that already exists. And the PID file is also used to shutdown the daemon. Be sure to run the latest version of system daemon, and validate the pid file is correctly being written to the var/run path I showed you in the other ticket. Cat the file, does it contain the process ID that matches your daemon in 'ps auxf' ? what happens when you type 'kill' <thatnumber>, does the postix signal show up in your logfile?
 [2010-01-08 17:07 UTC] martinjanda (Martin Janda)
Thanks for the quick reply. Pid file is ok = Number of procces is correct. When I user kill ?<number>, procces get down correct. The postix signal doesn't show up in my logfile. When I use /etc/ini.d/myscript stop, pid file was remove, but procces is still running. Any idea?
 [2010-01-08 17:12 UTC] kvz (Kevin van Zonneveld)
Haven't tested it on lenny yet so that Could be the problem. Try reviewing the init.d script and figuring out what command exactly is used to halt the daemon. Try running it by hand (remove any >dev/null stuff), so you can see what's going on
 [2010-01-08 17:29 UTC] martinjanda (Martin Janda)
Thanks for your advice. I discovered the problem. Problem is in /etc/init.d/myscript in DAEMON value. Procces run as "/usr/bin/php5 /home/janda/myscript.php", not just "/home/janda/myscript.php". Am I doing something wrong, or is it really bug? Thank you
 [2010-01-08 17:54 UTC] kvz (Kevin van Zonneveld)
Well, what happens when you change it?
 [2010-01-08 17:58 UTC] martinjanda (Martin Janda)
It began to work correctly.
 [2010-01-08 18:02 UTC] kvz (Kevin van Zonneveld)
-Status: Feedback +Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. ok great!
 [2010-01-08 18:06 UTC] martinjanda (Martin Janda)
-Status: Bogus +Status: Closed -Assigned To: +Assigned To: martinjanda