wok-current view unfs3/stuff/etc/init.d/unfsd @ rev 24885
updated mcabber (0.9.10 -> 1.1.2)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Apr 01 07:52:41 2022 +0100 (2022-04-01) |
parents | 1b6281d68d9f |
children |
line source
1 #!/bin/sh
2 # /etc/init.d/unfsd : Start, stop and restart NFSv3 Server on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start NFSv3 Server at boot time, just put dropbear in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=unfsd
12 DESC="$(_ '%s server' NFSv3)"
13 DAEMON=/usr/bin/unfsd
14 OPTIONS=
15 PIDFILE=/var/run/$NAME.pid
18 test -f $DAEMON || exit 0
20 case "$1" in
21 start)
22 if active_pidfile $PIDFILE unfsd ; then
23 _ '%s is already running.' $NAME
24 exit 1
25 fi
27 action 'Starting %s: %s...' "$DESC" $NAME
28 $DAEMON $OPTIONS
29 status
31 # registering PID
32 if [ $? -eq 0 ]; then
33 pidof -s $NAME > $PIDFILE
34 fi
35 ;;
36 stop)
37 if ! active_pidfile $PIDFILE unfsd ; then
38 _ '%s is not running.' $NAME
39 exit 1
40 fi
41 action 'Stopping %s: %s...' "$DESC" $NAME
42 kill $(cat $PIDFILE)
43 rm -f $PIDFILE
44 status
45 ;;
46 restart)
47 $0 stop
48 $0 start
49 ;;
50 *)
51 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
52 newline
53 exit 1
54 ;;
55 esac
57 exit 0