On Aug 27, 2008, at 6:13 AM, Bradley Giesbrecht wrote:
Others will answer this better I'm sure and I haven't used Debian in a while but I would do:
Debian names its httpd 'apache2'. sctemme@surtur:~$ cat /var/run/apache2.pid 5692 sctemme@surtur:~$ sudo rm /var/run/apache2.pid [sudo] password for sctemme: sctemme@surtur:~$ cat /var/run/apache2.pid cat: /var/run/apache2.pid: No such file or directory
$sudo ps ax | grep httpd
sctemme@surtur:~$ ps -lC apache2 F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD5 S 0 5692 1 0 78 0 - 43517 - ? 00:00:00 apache2 5 S 33 7436 5692 0 77 0 - 43517 - ? 00:00:00 apache2 5 S 33 7437 5692 0 77 0 - 43517 - ? 00:00:00 apache2 5 S 33 7438 5692 0 77 0 - 43517 - ? 00:00:00 apache2 5 S 33 7439 5692 0 81 0 - 43517 - ? 00:00:00 apache2 5 S 33 7440 5692 0 81 0 - 43517 - ? 00:00:00 apache2
(don't have to be root to do this)
$sudo kill "lowest httpd process id goes here"
The one you want to touch is the one with PPID 1: that's the parent process.
sctemme@surtur:~$ sudo kill -HUP 5692
$sudo /etc/init.d/apache2 start
sctemme@surtur:~$ cat /var/run/apache2.pid 5692In other words: a restart as effected by the Hangup signal puts the pidfile back.
I would be worried about its disapearance in the first place though. -- Sander Temme sctemme@xxxxxxxxxx PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF
Attachment:
smime.p7s
Description: S/MIME cryptographic signature