symkat/Daemon-Control — Issue #6: Generated init script doesn't do restarting properly
Author: doherty
Created: 2012-03-07 03:23:22+00:00
State: open

Here's a session where I restart a few times - observe how restart really just toggles the service on and off:

```
root@deschamps:~# sudo service php-fcgi restart
php-fcgi [Started]
root@deschamps:~# ps -u www-data
PID TTY TIME CMD
13575 ? 00:00:16 nginx
13576 ? 00:00:23 nginx
13577 ? 00:00:17 nginx
13578 ? 00:00:21 nginx
29323 ? 00:00:00 php-cgi
29325 ? 00:00:00 php-cgi
29326 ? 00:00:00 php-cgi
29327 ? 00:00:00 php-cgi
29328 ? 00:00:00 php-cgi
29329 ? 00:00:00 php-cgi
29330 ? 00:00:00 php-cgi
29331 ? 00:00:00 php-cgi
29332 ? 00:00:00 php-cgi
29333 ? 00:00:00 php-cgi
29334 ? 00:00:00 php-cgi
root@deschamps:~# sudo service php-fcgi restart
php-fcgi [Stopped]
root@deschamps:~# ps -u www-data
PID TTY TIME CMD
13575 ? 00:00:16 nginx
13576 ? 00:00:23 nginx
13577 ? 00:00:17 nginx
13578 ? 00:00:21 nginx
root@deschamps:~# sudo service php-fcgi restart
php-fcgi [Started]
root@deschamps:~# ps -u www-data
PID TTY TIME CMD
13575 ? 00:00:16 nginx
13576 ? 00:00:23 nginx
13577 ? 00:00:17 nginx
13578 ? 00:00:21 nginx
29346 ? 00:00:00 php-cgi
29348 ? 00:00:00 php-cgi
29349 ? 00:00:00 php-cgi
29350 ? 00:00:00 php-cgi
29351 ? 00:00:00 php-cgi
29352 ? 00:00:00 php-cgi
29353 ? 00:00:00 php-cgi
29354 ? 00:00:00 php-cgi
29355 ? 00:00:00 php-cgi
29356 ? 00:00:00 php-cgi
29357 ? 00:00:00 php-cgi
```

Have I done something wrong? Clearly, I'd expect restart to stop then start again.