2 # -*- mode: shell-script; coding: UTF-8 -*-
5 # description: Start or stop the unfs3 server
9 # Required-Start: $network
10 # Required-Stop: $network
11 # Default-Start: 2 3 4 5
13 # Description: Start or stop the unfs3 server
16 description="unfs3 NFS server"
17 lockfile="/var/lock/subsys/unfsd"
18 pidfile="/var/run/unfsd.pid"
23 echo "Starting" ${description}
24 /usr/sbin/unfsd -i ${pidfile}
26 if [ "${RETVAL}" = "0" ]; then
27 touch ${lockfile} >/dev/null 2>&1
31 echo "Shutting down" ${description}
32 if [ -s ${pidfile} ]; then
34 kill -TERM ${pid} 2>/dev/null
36 if kill -0 ${pid} 2>/dev/null; then
40 rm -f ${lockfile} ${pidfile}
43 if [ -s ${pidfile} ]; then
45 if kill -0 ${pid} 2>/dev/null; then
46 echo "${description} (pid ${pid}) is running"
49 echo "${description} is stopped"
53 echo "${description} is stopped"
58 /etc/init.d/unfsd stop && /etc/init.d/unfsd start
62 [ -f /var/lock/subsys/unfsd ] && /etc/init.d/unfsd stop && /etc/init.d/unfsd start
66 echo "Usage: $0 {start|stop|restart|condrestart|status}"