From a71d0b5a555b2ec644f45c6057eb6f8a01f89ea9 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 12 Sep 2019 23:46:15 +0800 Subject: [PATCH] Update rsyncd.tpl --- plugins/rsyncd/init.d/rsyncd.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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[@]}