2002-02-21 17:18:46 +03:00
|
|
|
|
#! /bin/sh
|
1998-02-27 07:54:42 +03:00
|
|
|
|
#
|
|
|
|
|
# skeleton Example file to build /etc/init.d scripts.
|
|
|
|
|
#
|
2002-08-26 07:46:17 +04:00
|
|
|
|
# Version: @(#) /etc/init.d/mcserv 07/10/2000
|
1998-02-27 07:54:42 +03:00
|
|
|
|
#
|
|
|
|
|
# Author: Tomasz K<>oczko, <kloczek@rudy.mif.pg.gda.pl>
|
|
|
|
|
# Michele Marziani <marziani@fe.infn.it>
|
2002-08-26 07:46:17 +04:00
|
|
|
|
# Preston Brown <pbrown@redhat.com>
|
1998-02-27 07:54:42 +03:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
2002-08-26 07:46:17 +04:00
|
|
|
|
. /etc/init.d/functions
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
2001-07-14 04:32:44 +04:00
|
|
|
|
RETVAL=0
|
|
|
|
|
|
2002-08-26 07:46:17 +04:00
|
|
|
|
prog="mcserv"
|
|
|
|
|
|
|
|
|
|
start() {
|
|
|
|
|
echo -n $"Starting $prog: "
|
|
|
|
|
daemon /usr/bin/mcserv -d
|
|
|
|
|
RETVAL=$?
|
|
|
|
|
touch /var/lock/subsys/mcserv
|
|
|
|
|
echo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
|
echo -n $"Stopping $prog: "
|
|
|
|
|
killproc mcserv
|
|
|
|
|
RETVAL=$?
|
|
|
|
|
rm -f /var/lock/subsys/mcserv
|
|
|
|
|
echo
|
|
|
|
|
}
|
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
# See how we were called.
|
|
|
|
|
case "$1" in
|
|
|
|
|
start)
|
2002-08-26 07:46:17 +04:00
|
|
|
|
start
|
1998-02-27 07:54:42 +03:00
|
|
|
|
;;
|
|
|
|
|
status)
|
|
|
|
|
status mcserv
|
|
|
|
|
;;
|
1998-05-05 04:25:51 +04:00
|
|
|
|
restart|reload)
|
2002-08-26 07:46:17 +04:00
|
|
|
|
stop
|
|
|
|
|
start
|
1998-02-27 07:54:42 +03:00
|
|
|
|
;;
|
2002-08-26 07:46:17 +04:00
|
|
|
|
condrestart)
|
|
|
|
|
if [ -f /var/lock/subsys/mcserv ]; then
|
|
|
|
|
stop
|
|
|
|
|
start
|
|
|
|
|
fi
|
|
|
|
|
;;
|
1998-02-27 07:54:42 +03:00
|
|
|
|
stop)
|
2002-08-26 07:46:17 +04:00
|
|
|
|
stop
|
1998-02-27 07:54:42 +03:00
|
|
|
|
;;
|
|
|
|
|
*)
|
2002-08-26 07:46:17 +04:00
|
|
|
|
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
1998-02-27 07:54:42 +03:00
|
|
|
|
exit 1
|
|
|
|
|
esac
|
|
|
|
|
|
2001-07-14 04:32:44 +04:00
|
|
|
|
exit $RETVAL
|