diff options
author | Britney Fransen <brfransen@gmail.com> | 2015-02-20 20:11:18 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2015-02-20 20:11:18 (GMT) |
commit | 53d9a174f4f05c94c0fe392a83deb310095310b1 (patch) | |
tree | 3805c7057bff77acedd900fb1eae8a62db1b01cc /abs/core/xymon/hobbit-myth-orphan.sh | |
parent | 6fde8cd5e74f0840e01988e743464fe91c0a28f8 (diff) | |
download | linhes_pkgbuild-53d9a174f4f05c94c0fe392a83deb310095310b1.zip linhes_pkgbuild-53d9a174f4f05c94c0fe392a83deb310095310b1.tar.gz linhes_pkgbuild-53d9a174f4f05c94c0fe392a83deb310095310b1.tar.bz2 |
xymon: add smart monitor
hobbit-myth-orphan.sh: add some help text
Diffstat (limited to 'abs/core/xymon/hobbit-myth-orphan.sh')
-rw-r--r-- | abs/core/xymon/hobbit-myth-orphan.sh | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/abs/core/xymon/hobbit-myth-orphan.sh b/abs/core/xymon/hobbit-myth-orphan.sh index cc4ca30..ff91fb5 100644 --- a/abs/core/xymon/hobbit-myth-orphan.sh +++ b/abs/core/xymon/hobbit-myth-orphan.sh @@ -2,13 +2,10 @@ TMPFILE=/tmp/oprhan.result MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/find_orphans.py --printonly > $TMPFILE - COLUMN=orphan # Name of the column COLOR=green # By default, everything is OK -MSG="No Orphans Found." - - +MSG="No Orphans Found." #yellow for i in "Orphaned video files" "Orphaned snapshots" "Database backups" "Other files" "Recordings with missing files" "Zero byte recordings" @@ -22,27 +19,18 @@ do fi done -#red -#for i in "Recordings with missing files" "Zero byte recordings" -#do -# grep -q "$i" $TMPFILE -# status=$? -# if [ $status -eq 0 ] -# then -# COLOR="red" -# MSG="Problems with $i" -# fi -#done - +if [[ $MSG != "No Orphans Found." ]] +then MSG=" ${MSG} - `cat $TMPFILE` " -# Tell Hobbit about it -$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date` - ${MSG} - " -exit 0 - - + `cat $TMPFILE` +<b>From <a href="/shell/" target="_blank">System >> Terminal</a> run find_orphans.py to clean up these issues.</b> +" +fi +# Tell Hobbit about it +$BB $BBDISP "status $MACHINE.$COLUMN $COLOR Results from find_orphans.py + ${MSG} + " +exit 0 |