1998-02-27 07:54:42 +03:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
#
|
|
|
|
|
# skeleton Example file to build /etc/init.d scripts.
|
|
|
|
|
#
|
|
|
|
|
# Version: @(#) /etc/init.d/mcserv 09-Apr-1997
|
|
|
|
|
#
|
|
|
|
|
# Author: Tomasz K<>oczko, <kloczek@rudy.mif.pg.gda.pl>
|
|
|
|
|
# Michele Marziani <marziani@fe.infn.it>
|
|
|
|
|
#
|
|
|
|
|
# chkconfig: - 86 30
|
|
|
|
|
# description: The Midnight Commander server allows users on remote machines \
|
|
|
|
|
# to use the Midnight Commander file manager to manipulate their \
|
|
|
|
|
# files on the machine running the server. The server \
|
|
|
|
|
# authenticates the user through PAM, which by default requires \
|
|
|
|
|
# a username/password combination before allowing access.
|
1998-05-05 04:39:13 +04:00
|
|
|
|
# processname: mcserv
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
|
|
# Source function library.
|
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
|
|
2001-07-14 04:32:44 +04:00
|
|
|
|
RETVAL=0
|
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
# See how we were called.
|
|
|
|
|
case "$1" in
|
|
|
|
|
start)
|
|
|
|
|
echo -n "Starting mcserv services: "
|
|
|
|
|
daemon /usr/bin/mcserv -d
|
2001-07-14 04:32:44 +04:00
|
|
|
|
RETVAL=$?
|
1998-02-27 07:54:42 +03:00
|
|
|
|
touch /var/lock/subsys/mcserv
|
|
|
|
|
echo
|
|
|
|
|
;;
|
|
|
|
|
status)
|
|
|
|
|
status mcserv
|
|
|
|
|
;;
|
1998-05-05 04:25:51 +04:00
|
|
|
|
restart|reload)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
$0 stop
|
|
|
|
|
$0 start
|
|
|
|
|
;;
|
|
|
|
|
stop)
|
|
|
|
|
echo -n "Shutting down mcserv services: "
|
|
|
|
|
killproc mcserv
|
2001-07-14 04:32:44 +04:00
|
|
|
|
RETVAL=$?
|
1998-02-27 07:54:42 +03:00
|
|
|
|
rm -f /var/lock/subsys/mcserv
|
|
|
|
|
echo
|
|
|
|
|
;;
|
|
|
|
|
*)
|
1998-05-05 04:25:51 +04:00
|
|
|
|
echo "Usage: mcserv.init {start|stop|status|restart|reload}"
|
1998-02-27 07:54:42 +03:00
|
|
|
|
exit 1
|
|
|
|
|
esac
|
|
|
|
|
|
2001-07-14 04:32:44 +04:00
|
|
|
|
exit $RETVAL
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|