Resilio-sync auto restart

syncheck.shweb

#!/bin/sh
if [ $(pgrep xxxrslsync) ]; then
   echo && date >> /home/pi/sync/syncheck.log 
   echo "btsync is running" >> /home/pi/sync/syncheck.log 
else
   echo && date >> /home/pi/sync/syncheck.log 
   echo "[Error]btsync not running, so I must do restart it" >> /home/pi/sync/syncheck.log 
   # DO something ....
   cd /home/pi/sync/ && ./rslsync --webui.listen 10.10.10.12:8888 --log /var/log/rslsync.log
    
fi

 

 

crontabui

*/1 * * * * /home/user/sync/syncheck.sh 
相關文章
相關標籤/搜索