Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12740 - Change PID detection in lighttpd rc.d script...

Attached to Project: Arch Linux
Opened by Matthew Gyurgyik (pyther) - Saturday, 10 January 2009, 20:20 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 21 March 2009, 11:48 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I would like to suggest that PID=`pidof -o %PPID /usr/sbin/lighttpd` gets changed to PID=`pidof -o %PPID lighttpd` in /etc/rc.d/lighttpd

I have two lighttpd servers running. A public one and a private one, /usr/sbin/lighttpd and /usr/sbin/lighttpd-radio (symlink), respectively.

[pyther@mongo ~]$ ps aux | grep lighttpd
http 12024 0.0 0.4 5436 2384 ? S 14:45 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
steve 12132 0.0 0.3 5004 1460 ? S 14:47 0:00 /usr/sbin/lighttpd-radio -f /etc/lighttpd/lighttpd-radio.conf

With pidof -o %PPID /usr/sbin/lighttpd two pids get returned (both lighttpd and lighttpd-radio):

[pyther@mongo ~]$ sudo pidof -o %PPID /usr/sbin/lighttpd
12132 12024

With pidof -o %PPID lighttpd only one pid gets returned (lighttpd):
[pyther@mongo ~]$ sudo pidof -o %PPID lighttpd
12024

As you can see with the current rc.d script when I run /etc/rc.d/lighttpd stop, it kills both lighttpd and lighttpd-radio. Changing the pidof command will kill the appropriate lighttpd server, not both.


This task depends upon

Closed by  Pierre Schmitz (Pierre)
Saturday, 21 March 2009, 11:48 GMT
Reason for closing:  Won't implement
Additional comments about closing:  There is no real problem with current packages.
Comment by Roman Kyrylych (Romashka) - Sunday, 11 January 2009, 09:30 GMT
I don't quite understand how this will fix the problem.
How are you going to kill lighttpd-radio then?

BTW, as I see from the script /var/run/lighttpd/lighttpd.pid is not used for anything :-/
Comment by Matthew Gyurgyik (pyther) - Sunday, 11 January 2009, 14:03 GMT
I copied rc.d/lighttpd to rc.d/lighttpd-radio. Then in lighttpd-radio I renamed all the instances of lighttpd to lighttpd-radio.

So when I run /etc/rc.d/lighttpd-radio start, it starts /usr/sbin/lighttpd-radio (just a symlink to lighttpd).
Then when I run /etc/rc.d/lighttpd-radio stop, it will kill the pid which I got from pidof -o %PPID lighttpd-radio

/etc/rc.d/lighttpd stop will only kill /usr/sbin/lighttpd
/etc/rc.d/lighttpd-radio stop will only kill /usr/sbin/lighttpd-radio
When you use the pidof -o %PPID lighttpd/lighttpd-radio

Loading...