Resilio-sync auto restart

syncheck.sh

#!/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: --log /var/log/rslsync.log fi

crontab

*/ * * * * /home/user/sync/syncheck.sh 
上一篇:安装crab


下一篇:08Vue.js快速入门-Vue综合实战项目