]> git.pld-linux.org Git - packages/autolog.git/blame - autolog.init
- removed some obsolete rc-script macros + some minor changes
[packages/autolog.git] / autolog.init
CommitLineData
99f8c6a6
TO
1#! /bin/sh
2#
3# chkconfig: 2345 85 15
4#
5# description: autolog
6#
7# processname: autolog
8# pidfile: /var/run/autolog.pid
9# config: /etc/autolog.conf
10
11# Source function library
12. /etc/rc.d/init.d/functions
13
14# See how we were called.
15case "$1" in
16 start)
17 if [ ! -f /var/lock/subsys/autolog ]; then
18 msg_starting "Autolog"
b8289c52 19 daemon autolog < /dev/null
99f8c6a6
TO
20 RETVAL=$?
21 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/autolog
22 else
e22f31c9 23 msg_already_running "Autolog"
99f8c6a6
TO
24 exit 1
25 fi
26 ;;
27 stop)
28 if [ -f /var/lock/subsys/autolog ]; then
29 msg_stopping "Autolog"
30 killproc autolog
31 rm -f /var/lock/subsys/autolog >/dev/null 2>&1
32 else
e22f31c9 33 msg_not_running "Autolog"
99f8c6a6
TO
34 exit 1
35 fi
36 ;;
37 restart)
38 $0 stop
39 $0 start
40 ;;
41 status)
42 status autolog
43 ;;
44 *)
45 echo "Usage: $0 {start|stop|status|restart}"
46 exit 1
47esac
48
49exit $RETVAL
This page took 0.128516 seconds and 4 git commands to generate.