mirror of
https://github.com/outbackdingo/ports.git
synced 2026-02-06 01:16:26 +00:00
37 lines
571 B
Bash
Executable File
37 lines
571 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/network: start/stop the ISC DHCP Server
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
DEV=${DEV:-$(ls /sys/class/net/ | grep -Exv "(lo|sit0)" | head -n1)}
|
|
|
|
PROG=/sbin/dhcpcd
|
|
PIDFILE=/var/run/$PROGNAME.pid
|
|
OPTS="--waitip -h $(/bin/hostname) -z $DEV"
|
|
|
|
case $1 in
|
|
start)
|
|
msg "Starting $PROGNAME..."
|
|
start_daemon $PROG $OPTS
|
|
;;
|
|
stop)
|
|
msg "Stopping $PROGNAME..."
|
|
stop_daemon $PROG
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
status)
|
|
status_daemon $PROG
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart|status]"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|