4 # skeleton example file to build /etc/init.d/ scripts.
5 # This file should be used to construct scripts for /etc/init.d.
7 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
8 # Modified for Debian GNU/Linux
9 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10 # Modified for the nbd-server package
11 # by Wouter Verhelst <wouter@debian.org>
13 # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
16 # Provides: nbd-server
17 # Required-Start: $remote_fs $syslog
18 # Required-Stop: $remote_fs $syslog
19 # Should-Start: $network
20 # Should-Stop: $network
21 # Default-Start: 2 3 4 5
23 # Short-Description: Network Block Device server
26 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
27 DAEMON
="/bin/nbd-server"
29 DESC
="Network Block Device server"
31 test -x $DAEMON ||
exit 0
35 start-stop-daemon
--start --quiet --exec /bin
/nbd-server
--oknodo --pidfile /var
/run
/nbd-server.pid
39 echo -n "Stopping $DESC:"
40 start-stop-daemon
--stop --quiet --exec /bin
/nbd-server
--oknodo --pidfile /var
/run
/nbd-server.pid
--retry 1
44 echo "Restarting the $DESC is pretty harsh on clients still using it."
45 echo -n "waiting 5 seconds..."
47 echo "You have been warned!"
48 echo -n "Restarting $DESC: "
55 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
56 echo "Usage: $N {start|stop|restart|force-reload}" >&2