File: init.d

package info (click to toggle)
bind 1%3A8.1.2-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,072 kB
  • ctags: 7,956
  • sloc: ansic: 54,480; sh: 6,937; makefile: 2,900; yacc: 1,223; perl: 315; lex: 221; awk: 45; sed: 15
file content (45 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
#
# Start or stop named
#
# Robert Leslie <rob@mars.org>

test -x /usr/sbin/named || exit 0

case "$1" in
    start)
	echo -n "Starting domain name service: named"
	start-stop-daemon --start --quiet --exec /usr/sbin/named
	echo "."	
    ;;

    stop)
	echo -n "Stopping domain name service: named"
	start-stop-daemon --stop --quiet  \
	    --pidfile /var/run/named.pid --exec /usr/sbin/named
	echo "."	
    ;;

    restart)
        $0 stop
        $0 start
    ;;
    
    reload)
	echo -n "Reloading named configuration..."
	start-stop-daemon --stop --signal 1 --quiet  \
	    --pidfile /var/run/named.pid --exec /usr/sbin/named
	echo "done." 
    ;;

    force-reload)
        $0 restart
    ;;

    *)
	echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
	exit 1
    ;;
esac

exit 0