您的位置:首页 > 运维架构 > Shell

客户同步的脚本

2016-03-18 18:04 495 查看
#!/bin/bash
declare x=0

function check
{

for i in `ps -ef | grep rsync`
do
if [[ $i =~ "-vzrtP" ]]; then
x=1
fi
done

return $x
}
check
[[ $x -eq 0 ]]&&nohup rsync -vzrtP --exclude '*kb/' --exclude '*.m3u8' --exclude '*.jpg' -u SvcCWRSYNC@45.61.238.215::small /home/www/media/videos/iphone/&
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux shell