opt/nfs-utils/nfsdcld

37 lines
684 B
Plaintext
Raw Normal View History

2019-05-15 17:07:39 +02:00
#!/bin/sh
#
2019-06-23 14:48:08 +02:00
# /etc/rc.d/rpc.statd: start/stop NFSv4 Client Tracking Daemon
2019-05-15 17:07:39 +02:00
#
SSD=/sbin/start-stop-daemon
2020-02-10 14:44:40 +01:00
PROG=/usr/sbin/nfsdcld
2019-05-15 17:07:39 +02:00
PID=/var/run/nfsdcld
OPTS="--foreground"
case $1 in
start)
$SSD --start -bmC --pidfile $PID --exec $PROG -- $OPTS
;;
stop)
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
;;
restart)
$0 stop
$0 start
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file