Archive of https://github.com/drakmor/Watchdog — Ensures webstream is running and Rivendell shares are mounted. https://github.com/drakmor/Watchdog
  • Shell 94.2%
  • Makefile 5.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2017-06-20 16:40:10 -04:00
COPYING Add NIC restart code, fix up README 2012-07-07 22:26:57 -04:00
Makefile Add info on crontab. 2012-07-28 23:08:01 -04:00
README.md Make NIC code smarter 2012-08-11 11:01:09 -04:00
start-listenbot.sh Initial commit 2012-07-07 18:31:47 -04:00
test.sh Add testing script 2012-07-22 11:48:03 -04:00
watchdog2.sh Redirect output to log file 2012-08-18 18:11:46 -04:00
watchdog3.sh add new server watchdog 2017-06-20 16:40:10 -04:00

Watchdog

WMFO - Tufts Freeform Radio
ops@wmfo.org
For copyrights and licensing, see COPYING.

A watchdog script to make sure the webstream processes are running, that the rivendell shares are mounted, and the NICs are conencted to the network.

Usage: watchdog2.sh <log_file>

It is recomended you place something similar to the following in root's crontab (sudo crontab -e):
@reboot /opt/wmfo/watchdog/watchdog2.sh /var/log/watchdog2.log

Changelog

###??/??/?? Initial version. - Benjamin Yu

###10/23/11 Made log file far less verbose. Now logs only on errors. Includes date. - Andy Sayler

###10/24/11 Branched from watchdog.sh to watchdog2.sh - Andy Sayler

###10/24/11 Added automatic unmounting on detection of multiple mounts. - Andy Sayler

###10/24/11 Refactored to mount and unmount on mount point names, not network paths. This should avoid needing to change this script when switching between primary and secondary network data stores. Just change the mount device path in /etc/fstab and the changes will be reflected here. If mount points are changed, this script will still need modified. - Andy Sayler

###07/07/12 Add checks to restart external and internal NICs in case no IP is detected. This assumes that, under normal operation, eth0 has a 192.168 address and eth1 has a 130.64 (Tufts network) address. - Max Goldstein

###08/11/12 Make NIC handling code smarter. Now runs only every 30 seconds, stops trying to handle it after 3 consecutive failures, and does nothing on restart until the NIC has connected successfully. - Max Goldstein