]> git.pld-linux.org Git - packages/atsar.git/blame_incremental - atsar.init
cosmetics
[packages/atsar.git] / atsar.init
... / ...
CommitLineData
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.
11if [ -f /etc/rc.d/init.d/functions ]
12then
13 . /etc/rc.d/init.d/functions
14else
15 alias daemon=nice
16fi
17
18# Check binaries and configuration files.
19[ -f /usr/bin/atsadc ] || exit 0
20
21RETVAL=0
22# See how we were called.
23case "$1" in
24 start)
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/atsar ]; then
27 # Run atsadc.
28 msg_starting atsar
29 daemon /usr/bin/atsadc /var/log/atsar/atsa`date +%d`
30 RETVAL=$?
31 rm -f /var/log/atsar/ftpstat 2> /dev/null
32 rm -f /var/log/atsar/httpstat 2> /dev/null
33
34 if [ -f /etc/atsar.conf ]; then
35 /usr/bin/atsaftp
36 /usr/bin/atsahttp
37 fi
38 echo
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atsar
40 else
41 msg_already_running atsar
42 fi
43 ;;
44 stop)
45 if [ -f /var/lock/subsys/atsar ]; then
46 msg_stopping atsar
47 daemon rm -f /var/lock/subsys/atsar
48 else
49 msg_not_running atsar
50 fi
51 ;;
52 status)
53 ;;
54# reload)
55# # to be fixed
56# $0 stop
57# $0 start
58# exit $?
59# ;;
60 restart|force-reload)
61 $0 stop
62 $0 start
63 exit $?
64 ;;
65 *)
66 msg_usage "$0 {start|stop|restart|force-reload|status}"
67 exit 3
68esac
69
70exit $RETVAL
This page took 0.06635 seconds and 4 git commands to generate.