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:8888 --log /var/log/rslsync.log fi
crontab
*/1 * * * * /home/user/sync/syncheck.sh