#!/bin/bash


case "$1" in

start)

echo "Starting yum_rsync daemon..."

/data/script/yum_rsync.sh #修改为你需要的代码

;;


stop)

echo "Stopping yum_rsync daemon..."

killall yum_rsync.sh

killall rsync  #修改为你需要的

;;


restart)

echo "Restarting yum_rsync daemon..."

$0 stop

$0 start

;;


status)

ps -ef | grep rsync   #修改为你需要的

;;


*)

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

exit 1

;;

esac