]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/system/dhcrelay
unbound: Drop certificates for local control connection
[ipfire-2.x.git] / src / initscripts / system / dhcrelay
CommitLineData
22ab0e0c
MT
1#!/bin/sh
2########################################################################
3# Begin $rc_base/init.d/dhcrelay
4#
5# Description : The DHCP Relay Daemon
6#
7########################################################################
8
9. /etc/sysconfig/rc
10. ${rc_functions}
11
12CONFIG_FILE="/var/ipfire/dhcp/relay"
13
14if [ -r "${CONFIG_FILE}" ]; then
15 eval $(/usr/local/bin/readhash ${CONFIG_FILE})
16fi
17
18ARGS="-q"
19
20for interface in ${INTERFACES}; do
21 ARGS="${ARGS} -i ${interface}"
22done
23
24ARGS="${ARGS} ${SERVERS}"
25
26case "${1}" in
27 start)
28 boot_mesg "Starting DHCP Relay..."
29 loadproc /usr/sbin/dhcrelay ${ARGS}
30 ;;
31
32 stop)
33 boot_mesg "Stopping DHCP Relay..."
34 killproc -p /var/run/dhcrelay.pid /usr/sbin/dhcrelay
35 ;;
36
37 restart)
38 ${0} stop
39 sleep 1
40 ${0} start
41 ;;
42
43 status)
44 statusproc /usr/sbin/dhcrelay
45 ;;
46
47 *)
48 echo "Usage: ${0} {start|stop|restart|status}"
49 exit 1
50 ;;
51esac
52
53# End $rc_base/init.d/dhcrelay