]> git.pld-linux.org Git - packages/sysstat.git/blob - sysstat.init
- fixed Norwegian (no, nn) locale names and added pl translation
[packages/sysstat.git] / sysstat.init
1 #!/bin/sh
2 #
3 # sysstat       Sysstat system monitoring utility
4 #
5 # chkconfig:    2345 35 55
6 #
7 # description:  Sysstat system monitoring tools (sar,iostat,mpstat) \
8 #
9
10 # Source function library
11 . /etc/rc.d/init.d/functions
12
13
14 # See how we were called.
15 case "$1" in
16   start)
17         # Check if the service is already running?
18         if [ ! -f /var/lock/subsys/sysstat ]; then
19                 msg_starting "system activity data collector"
20                 daemon /usr/lib/sa/sadc
21                 RETVAL=$?
22                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sysstat
23         else
24                 msg_already_running "system activity data collector"
25                 exit 1
26         fi
27         ;;
28   stop)
29         # Stop daemons.
30         if [ -f /var/lock/subsys/sysstat ]; then
31                 msg_stopping "system activity data collector"
32                 echo
33                 rm -f /var/lock/subsys/sysstat >/dev/null 2>&1
34         else
35                 msg_not_running "system activity data collector"
36                 exit 1
37         fi
38         ;;
39   status)
40         status sysstat
41         ;;
42   restart)
43         $0 stop
44         $0 start
45         ;;
46   *)
47         msg_usage "$0 {start|stop|status|restart}"
48         exit 1
49 esac
50
51 exit $RETVAL
This page took 0.09088 seconds and 3 git commands to generate.