]> git.pld-linux.org Git - packages/sysstat.git/blame - sysstat.init
- fixed+standardized post
[packages/sysstat.git] / sysstat.init
CommitLineData
87425f14 1#!/bin/sh
2#
76a8375a 3# sysstat Sysstat system monitoring utility
87425f14 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
4ab9494d 13RETVAL=0
87425f14 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=$?
648b9c8e 22 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/sysstat
87425f14 23 else
7fd96817 24 msg_already_running "system activity data collector"
87425f14 25 fi
26 ;;
27 stop)
76a8375a 28 if [ -f /var/lock/subsys/sysstat ]; then
29 # Stop daemons.
30 msg_stopping "system activity data collector"
eee32da1 31 ok
76a8375a 32 rm -f /var/lock/subsys/sysstat >/dev/null 2>&1
33 else
34 msg_not_running "system activity data collector"
76a8375a 35 fi
87425f14 36 ;;
37 status)
38 status sysstat
4ab9494d 39 exit $?
87425f14 40 ;;
4ab9494d 41 restart|force-reload)
87425f14 42 $0 stop
43 $0 start
76a8375a 44 exit $?
648b9c8e 45 ;;
87425f14 46 *)
4ab9494d 47 msg_usage "$0 {start|stop|restart|force-reload|status}"
48 exit 3
648b9c8e 49 ;;
87425f14 50esac
51
52exit $RETVAL
This page took 0.339744 seconds and 4 git commands to generate.