Modify ↓
Opened 9 years ago
Closed 9 years ago
#4692 closed defect (worksforme)
dhcpd init script doesn't kill dhcpd when restarting or stopping
Reported by: | exobyte | Owned by: | florian |
---|---|---|---|
Priority: | low | Milestone: | Kamikaze 8.09.1 |
Component: | packages | Version: | |
Keywords: | Cc: |
Description
For some reason, kill needs to sent a hangup.
This script seems to work:
#!/bin/sh /etc/rc.common START=60 lease_file=/tmp/dhcpd.leases config_file=/etc/dhcpd.conf pid_file=/var/run/dhcpd.pid start() { echo Starting isc-dhcpd if [ ! -e $lease_file ]; then echo " Creating $lease_file" touch $lease_file fi /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file -pf $pid_file if [ $? -ne 0 ]; then echo " isc-dhcpd failed to start" fi } stop() { echo "Stopping isc-dhcpd" if [ -e $pid_file ]; then kill -HUP `cat $pid_file` if [ $? -ne 0 ]; then echo " PID " `cat $pid_file` not found echo " Is the DHCP server running?" else echo " DHCP server stopped" fi rm $pid_file else echo " $pid_file not found" fi }
Attachments (0)
Change History (2)
comment:1 Changed 9 years ago by florian
- Milestone set to Kamikaze 8.09.1
- Owner changed from developers to florian
- Priority changed from normal to low
- Status changed from new to assigned
comment:2 Changed 9 years ago by florian
- Resolution set to worksforme
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
No it does not need this: