#!/bin/bash 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." #yellow for i in "Orphaned video files" "Orphaned snapshots" "Database backups" "Other files" "Recordings with missing files" "Zero byte recordings" do grep -q "$i" $TMPFILE status=$? if [ $status -eq 0 ] then COLOR="yellow" MSG="Problems with $i" 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 MSG=" ${MSG} `cat $TMPFILE` " # Tell Hobbit about it $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date` ${MSG} " exit 0