summaryrefslogtreecommitdiffstats
path: root/redhat/kdenetwork/lisa.redhat
blob: bcc059e863e0556d2b1ec44522b24a46abe20546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#
# Startup script for LISa
#
# chkconfig: - 92 36
# description: LISa is a small daemon which is intended to run on \
#              end user systems. It provides something like a \
#              "network neighbourhood", but only relying on the TCP/IP \
#              protocol stack, no smb or whatever.\
#              The information about the hosts in your "neighbourhood" \
#              is provided via TCP port 7741.
# processname: lisa
# config: /etc/lisarc

# Source function library.
. /etc/rc.d/init.d/functions

# Source function library.
if [ -f /etc/init.d/functions ] ; then
  . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
  . /etc/rc.d/init.d/functions
else
  exit 0
fi

# Some definitions.
lisa=/usr/bin/lisa
prog=LISa
OPTIONS="--quiet --config=/etc/lisarc"
RETVAL=0

#
start() {
        echo -n $"Starting $prog: "
        daemon $lisa $OPTIONS
        RETVAL=$?
        echo
        if [ $RETVAL = 0 ] ; then
           touch /var/lock/subsys/lisa
        else
           RETVAL=1
        fi
        return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $lisa
	RETVAL=$?
	echo
	if [ $RETVAL = 0 ] ; then
           rm -f /var/lock/subsys/lisa
        else
           RETVAL=1
        fi
        return $RETVAL
}

reload() {
	echo -n $"Reloading $prog: "
	killproc $lisa -HUP
	RETVAL=$?
	echo
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
        status $lisa
	RETVAL=$?
	;;
  restart)
	stop
	start
	;;
  condrestart)
        [ -f /var/lock/subsys/lisa ] && restart
        ;;
  *)
	echo $"Usage: $prog {start|stop|restart|status|condrestart}"
	exit 1
esac

exit $RETVAL