Ticket #1396: Fixed logic of processing '--with-search-engine' configure option.
[midnight-commander.git] / contrib / mcserv.init
bloba0ce5ee453abb5ffb7f6156007d5a796b60fe5f1
1 #! /bin/sh
3 # skeleton Example file to build /etc/init.d scripts.
5 # Version: @(#) /etc/init.d/mcserv 07/10/2000
7 # Author: Tomasz K³oczko, <kloczek@rudy.mif.pg.gda.pl>
8 # Michele Marziani <marziani@fe.infn.it>
9 # Preston Brown <pbrown@redhat.com>
11 # chkconfig: - 86 30
12 # description: The Midnight Commander server allows users on remote machines \
13 # to use the Midnight Commander file manager to manipulate their \
14 # files on the machine running the server. The server \
15 # authenticates the user through PAM, which by default requires \
16 # a username/password combination before allowing access.
17 # processname: mcserv
19 # Source function library.
20 . /etc/init.d/functions
22 RETVAL=0
24 prog="mcserv"
26 start() {
27 echo -n $"Starting $prog: "
28 daemon /usr/bin/mcserv -d
29 RETVAL=$?
30 touch /var/lock/subsys/mcserv
31 echo
34 stop() {
35 echo -n $"Stopping $prog: "
36 killproc mcserv
37 RETVAL=$?
38 rm -f /var/lock/subsys/mcserv
39 echo
42 # See how we were called.
43 case "$1" in
44 start)
45 start
47 status)
48 status mcserv
50 restart|reload)
51 stop
52 start
54 condrestart)
55 if [ -f /var/lock/subsys/mcserv ]; then
56 stop
57 start
60 stop)
61 stop
64 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
65 exit 1
66 esac
68 exit $RETVAL