Smokeping Slave 启动脚本

#!/bin/bash

# smokeping reboot file

# chenjiayun

. /etc/init.d/functions

# Start the service Smokeping

start() {

echo -n Starting Smokeping:

/usr/local/smokeping/bin/smokeping master-url=http://ping.monitor.ustack.com cache-dir=/usr/local/smokeping/cache shared-secret=/usr/local/smokeping/etc/smokeping_secrets.distslave-name=ZHSH logfile=/var/log/smokeping.log >/dev/null 2>&1

### Create the lock file ###

touch /var/lock/subsys/smokeping

success $Smokeping startup

echo

}

# Restart the service Smokeping

stop() {

echo -n Stopping Smokeping:

kill -9 `ps ax | grep /usr/local/smokeping/bin/smokeping | grep -v grep | awk

{ print $1 }` >/dev/null 2>&1

### Now, delete the lock file ###

rm -f /var/lock/subsys/smokeping

success $Smokeping shutdown

echo

}

### main logic ###

case $1 in

start)

start

;;

stop)

stop

;;

status)

status Smokeping

;;

restart|reload|condrestart)

stop

start

;;

*)

echo $Usage: $0 {start|stop|restart|reload|status}

exit 1

esac

exit 0

 

YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS