Update rsyncd.tpl

pull/5/head
midoks 6 years ago
parent 37cb8c3898
commit a71d0b5a55
  1. 6
      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[@]}

Loading…
Cancel
Save