Rsnapshot: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 8: | Zeile 8: | ||
==Autostart== | ==Autostart== | ||
* Cronjob | |||
25 21 * * * root /opt/etc/start_sshd | |||
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart | start_sshd | ||
#!/bin/sh | |||
SERVICE='sshd' | |||
if ps | grep -v grep | grep $SERVICE > /dev/null | |||
then | |||
echo "$SERVICE service running, everything is fine" >> log.txt | |||
else | |||
echo "$SERVICE is not running" >> log.txt | |||
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart | |||
fi | |||
exit 0 | |||
Version vom 16. Oktober 2012, 19:28 Uhr
Ausführen von Rsnapshot
/opt/bin/rsnapshot -c /opt/etc/rsnapshot.conf.zeberli daily
Cronjob
vi /etc/crontab
Autostart
- Cronjob
25 21 * * * root /opt/etc/start_sshd
start_sshd
#!/bin/sh SERVICE='sshd'
if ps | grep -v grep | grep $SERVICE > /dev/null
then
echo "$SERVICE service running, everything is fine" >> log.txt
else
echo "$SERVICE is not running" >> log.txt
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart
fi
exit 0