mc/contrib/mcserv.init

69 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

#! /bin/sh
1998-02-27 07:54:42 +03:00
#
# skeleton Example file to build /etc/init.d scripts.
#
# 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>
# 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.
. /etc/init.d/functions
1998-02-27 07:54:42 +03:00
RETVAL=0
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)
start
1998-02-27 07:54:42 +03:00
;;
status)
status mcserv
;;
restart|reload)
stop
start
1998-02-27 07:54:42 +03:00
;;
condrestart)
if [ -f /var/lock/subsys/mcserv ]; then
stop
start
fi
;;
1998-02-27 07:54:42 +03:00
stop)
stop
1998-02-27 07:54:42 +03:00
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
1998-02-27 07:54:42 +03:00
exit 1
esac
exit $RETVAL