#!/bin/sh # # smokeping This shellscript takes care of starting and stopping # the smokeping latency meassurement daemon # # chkconfig: - 42 58 # description: smoekping is a latency meassurement system for your network # processname: smokeping # config: /etc/smokeping/config # pidfile: /var/run/smokeping.pid # # Source function library. . /etc/init.d/functions # Source networking configuration. [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 start() { echo -n "Starting smokeping: " daemon /usr/bin/smokeping RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smokeping return $RETVAL } stop() { echo -n "Shutting down smokeping: " killproc smokeping RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/smokeping } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; status) status smokeping RETVAL=$? ;; condrestart) [ -f /var/lock/subsys/smokeping ] && restart ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart}" exit 1 esac exit $RETVAL