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} ROOT_PATH={$SERVER_PATH}
p_start(){ 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 if [ "$isStart" == '' ];then
echo -e "Starting rsync... \c" echo -e "Starting rsync... \c"
if [ -f /var/run/rsyncd.pid ]; then if [ -f /var/run/rsyncd.pid ]; then
@ -23,7 +23,7 @@ p_start(){
fi fi
/usr/bin/rsync --daemon /usr/bin/rsync --daemon
sleep 0.3 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 if [ "$isStart" == '' ];then
echo -e "\033[31mError: rsyncd service startup failed.\033[0m" echo -e "\033[31mError: rsyncd service startup failed.\033[0m"
return; return;
@ -36,7 +36,7 @@ p_start(){
p_stop(){ p_stop(){
echo -e "Stopping rsyncd... \c"; 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) arr=($pids)
for p in ${arr[@]} for p in ${arr[@]}

Loading…
Cancel
Save