diff --git a/plugins/rsyncd/init.d/rsyncd.tpl b/plugins/rsyncd/init.d/rsyncd.tpl index 9765c0f04..8fc9e2ae6 100755 --- a/plugins/rsyncd/init.d/rsyncd.tpl +++ b/plugins/rsyncd/init.d/rsyncd.tpl @@ -15,7 +15,7 @@ ROOT_PATH={$SERVER_PATH} p_start(){ - isStart=$(ps -ef | grep rsync | grep -v grep | grep -v python | awk '{print $2}') + isStart=$(ps -ef | grep rsync | grep 'daemon' | grep -v grep | grep -v python | awk '{print $2}') if [ "$isStart" == '' ];then echo -e "Starting rsync... \c" if [ -f /var/run/rsyncd.pid ]; then @@ -23,7 +23,7 @@ p_start(){ fi /usr/bin/rsync --daemon sleep 0.3 - isStart=$(ps -ef | grep rsync | grep -v grep | grep -v python | awk '{print $2}') + isStart=$(ps -ef | grep rsync | grep 'daemon' | grep -v grep | grep -v python | awk '{print $2}') if [ "$isStart" == '' ];then echo -e "\033[31mError: rsyncd service startup failed.\033[0m" return; @@ -36,7 +36,7 @@ p_start(){ p_stop(){ echo -e "Stopping rsyncd... \c"; - pids=$(ps -ef | grep rsync | grep -v grep | grep -v python | awk '{print $2}') + pids=$(ps -ef | grep rsync | grep 'daemon' | grep -v grep | grep -v python | awk '{print $2}') arr=($pids) for p in ${arr[@]}