#!/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/&
本文转自 15816815732 51CTO博客,原文链接:http://blog.51cto.com/68686789/1752683