Blame | Last modification | View Log | RSS feed
#! /bin/bash## atop advanced interactive monitor## chkconfig: - 90 60# description: atop is advanced interactive monitor# processname: atop# pidfile: /var/run/atop.pid# Source function library.. /etc/init.d/functionsRETVAL=0# See how we were called.prog="atop"start() {echo -n $"Starting $prog: "daemon atopdRETVAL=$?echo[ $RETVAL -eq 0 ] && touch /var/lock/subsys/atopreturn $RETVAL}stop() {echo -n $"Stopping $prog: "killproc atop 2>/dev/nullRETVAL=$?echo[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/atopreturn $RETVAL}rhstatus() {status atop}restart() {stopstart}reload() {echo -n $"Reloading atop daemon configuration: "killproc atop -HUPretval=$?echoreturn $RETVAL}case "$1" instart)start;;stop)stop;;restart)restart;;reload)reload;;status)rhstatus;;condrestart)[ -f /var/lock/subsys/atop ] && restart || :;;*)echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"exit 1esacexit $?