aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nsd/nsdc
blob: ff4cb5c6b7b91f14eca3eff40054b45b8852d441 (plain)
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
#!/bin/sh
#
# nsdc replacement script by Matt Smith <msmith@alpinelinux.org>
#

usage() {
	echo "Usage: `basename $0` {start|stop|reload|rebuild|restart|"
	echo "                          running|update|notify|patch}"
	echo "commands:"
	echo "  start           Start nsd server."
	echo "  stop            Stop nsd server."
	echo "  reload          Nsd server reloads database file."
	echo "  rebuild         Compile database file from zone files."
	echo "  restart         Stop the nsd server and start it again."
	echo "  running         Prints message and exit nonzero if server not running."
	echo "  update          Try to update all slave zones hosted on this server."
	echo "  notify          Send notify messages to all secondary servers."
	echo "  patch           Merge zone transfer changes back to zone files."
}

if [ $# -eq 0 ]; then
	usage
else
	case "$1" in
		"-h"|"--help")
			usage;;
		*)
			/etc/init.d/nsd $*
	esac
fi