]> git.pld-linux.org Git - packages/atsar.git/blob - atsar.init
- spelling fixes by Tomasz "Witek" Wittner <wittt_@poczta.onet.pl>
[packages/atsar.git] / atsar.init
1 #!/bin/sh
2 #
3 # atsar         This shell script takes care of initializing
4 #               the atsar system activity report subsystem.
5 #
6 # chkconfig: 2345 85 15
7 # description:  Atsar is a system activity report logging system.
8 #
9
10 # Source function library.
11 if [ -f /etc/rc.d/init.d/functions ]
12 then
13         . /etc/rc.d/init.d/functions
14 else
15         alias daemon=nice
16 fi
17
18 # Check binaries and configuration files.
19 [ -f //usr/bin/atsadc ] || exit 0
20
21 RETVAL=0
22
23 # See how we were called.
24 case "$1" in
25   start)
26         # Run atsadc.
27         msg_starting "atsar"
28         daemon //usr/bin/atsadc /var/log/atsar/atsa`date +%d`
29         RETVAL=$?
30         rm -f /var/log/atsar/ftpstat  2> /dev/null
31         rm -f /var/log/atsar/httpstat 2> /dev/null
32
33         if [ -f /etc/atsar.conf ]
34         then
35                 //usr/bin/atsaftp
36                 //usr/bin/atsahttp
37         fi
38         echo
39         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atsar
40         ;;
41   stop)
42         rm -f /var/lock/subsys/atsar
43         ;;
44   status)
45         ;;
46   reload)
47         $0 stop
48         $0 start
49         ;;
50   restart)
51         $0 stop
52         $0 start
53         ;;
54   *)
55         echo "Usage: $0 {start|stop|status|reload|restart}"
56         exit 1
57 esac
58
59 exit $RETVAL
This page took 0.068916 seconds and 3 git commands to generate.