Added initial unfs3 sources for version 0.9.22+dfsg-1maemo2
[unfs3] / unfs3 / debian / unfs3.init
1 #!/bin/sh
2
3 ### BEGIN INIT INFO
4 # Provides:          unfs3
5 # Required-Start:    $network
6 # Required-Stop:     $network
7 # Should-Start:
8 # Should-Stop:
9 # Default-Start:     2 3 4 5
10 # Default-Stop:      0 1 6
11 # Short-Description: starts user-space NFSv3 server
12 # Description:       UNFS3 is a user-space implementation of the NFSv3 server
13 #                    specification.
14 ### END INIT INFO
15
16 PATH=/sbin:/bin:/usr/sbin:/usr/bin
17 DAEMON=/usr/sbin/unfsd
18 NAME=unfs3
19 DESC=unfs3
20
21 test -x $DAEMON -a -f /etc/exports || exit 0
22
23 # Include #PACKAGE# defaults if available
24 if [ -f /etc/default/unfs3 ]
25 then
26         . /etc/default/unfs3
27 fi
28
29 set -e
30
31 case "$1" in
32         start)
33                 echo -n "Starting $DESC: "
34                 /etc/init.d/portmap start
35                 start-stop-daemon --start --quiet --oknodo --exec $DAEMON \
36                         -- $DAEMON_OPTS
37                 echo "$NAME."
38                 ;;
39
40         stop)
41                 echo -n "Stopping $DESC: "
42                 start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
43                 echo "$NAME."
44                 ;;
45
46         restart|force-reload)
47                 echo -n "Restarting $DESC: "
48                 start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
49                 sleep 1
50                 start-stop-daemon --start --quiet --oknodo --exec $DAEMON \
51                         -- $DAEMON_OPTS
52                 echo "$NAME."
53                 ;;
54
55         *)
56                 N=/etc/init.d/$NAME
57                 echo "Usage: $N {start|stop|restart|force-reload}" >&2
58                 exit 1
59                 ;;
60 esac
61
62 exit 0