rsync启动脚本
#!/bin/bash#chkconfig:23453050#Date:2017-6-29#Author:xcn(baishuchao@yeah.net)#version1.0PID="/var/run/rsync.pid"start_rsync(){if[-f$PID]thenecho"rsyncisrunning"elsersync--daemonecho"rsyncisstarted"fi}stop_rsync(){if[-f$PID]#存在而不为空thenkill-USR2`cat$PID`rm-rf$PIDecho"rsyncisstoped"elseecho"rsyncnorunning"fi}case$1instart)start_rsync;;stop)stop_rsync;;restart)stop_rsyncstart_rsync;;*)echo"USAGE:$0{start|stop|restart}"exit1esac
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。