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