]> git.pld-linux.org Git - packages/atsar.git/blob - atsar.init
- small fixed
[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         msg_stopping "atsar"
43         daemon  rm -f /var/lock/subsys/atsar
44         RETVAL=$?
45         ;;
46   status)
47         ;;
48   reload)
49         $0 stop
50         $0 start
51         ;;
52   restart)
53         $0 stop
54         $0 start
55         ;;
56   *)
57         echo "Usage: $0 {start|stop|status|reload|restart}"
58         exit 1
59 esac
60
61 exit $RETVAL
This page took 0.035189 seconds and 4 git commands to generate.