]> git.pld-linux.org Git - packages/sysstat.git/blame - sysstat.init
- fixed Norwegian (no, nn) locale names and added pl translation
[packages/sysstat.git] / sysstat.init
CommitLineData
87425f14 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.
15case "$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
7fd96817 24 msg_already_running "system activity data collector"
87425f14 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
7fd96817 35 msg_not_running "system activity data collector"
87425f14 36 exit 1
37 fi
87425f14 38 ;;
39 status)
40 status sysstat
41 ;;
42 restart)
43 $0 stop
44 $0 start
45 ;;
46 *)
7e55d0dd 47 msg_usage "$0 {start|stop|status|restart}"
87425f14 48 exit 1
49esac
50
51exit $RETVAL
This page took 0.050876 seconds and 4 git commands to generate.