summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-02-05 17:46:39 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-02-05 17:46:39 (GMT)
commita14f5c5af59be4f25ef3d76cd12f1d35f583e59f (patch)
tree865f41884e3949d3f999522c9ddc20bd336b92d9
parentdf3c050d16acbbba0ce57b88f5a36980afa7e001 (diff)
downloadlinhes_pkgbuild-a14f5c5af59be4f25ef3d76cd12f1d35f583e59f.zip
linhes_pkgbuild-a14f5c5af59be4f25ef3d76cd12f1d35f583e59f.tar.gz
linhes_pkgbuild-a14f5c5af59be4f25ef3d76cd12f1d35f583e59f.tar.bz2
LinHES-system: myth_mtc.cron: log to local6 so rsyslog myth rule catches
-rwxr-xr-xabs/core/LinHES-system/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-system/myth_mtc.cron23
2 files changed, 14 insertions, 13 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 2f77eaf..3db2a65 100755
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=8.3
-pkgrel=4
+pkgrel=5
arch=('i686' 'x86_64')
install=system.install
pkgdesc="Everything that makes LinHES an automated system"
@@ -132,7 +132,7 @@ md5sums=('8415c4b2587a8a1e6a312484c1edafcb'
'410795ef9039e4c6c0484e706ecfd567'
'eb879fee9603a05d5420d4ce8ed9e450'
'02c810c2f47b7c4495fdacaf54189473'
- '4559a466e2dd2141308bd44f7794e837'
+ '28ce5d884ee608b0479d4bf2a64697db'
'474d5c6883fcfffae4f199aceb3b1356'
'8fe800181dcdf45bb7d7b36e4de8409e'
'36bdfa8d877cea20ca3870faf08e08d5'
diff --git a/abs/core/LinHES-system/myth_mtc.cron b/abs/core/LinHES-system/myth_mtc.cron
index 637c0d6..0c098f1 100755
--- a/abs/core/LinHES-system/myth_mtc.cron
+++ b/abs/core/LinHES-system/myth_mtc.cron
@@ -6,10 +6,11 @@ date=`date +%Y-%m-%d`
timestamp=`date +'%Y-%m-%d %H:%M'`
hostname=`hostname`
logFile="/var/log/${date}/${hostname}_myth_mtc.log"
+log="logger -t myth_mtc -p local6.info"
if [ ! -f $logFile ]; then
touch $logFile
- echo "" | logger -t myth_mtc
+ echo "" | $log
fi
#check logfile for Finished and if not run myth_mtc.py
@@ -17,42 +18,42 @@ if ! grep -q "Finished Maintenance" $logFile
then
if ! grep -q "Finished Optimize" $logFile
then
- MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --optimize | logger -t myth_mtc
+ MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --optimize | $log
if [ $? = 0 ]
then
- echo "" | logger -t myth_mtc
+ echo "" | $log
else
- echo "Time Exceeded" | logger -t myth_mtc
+ echo "Time Exceeded" | $log
exit
fi
fi
if ! grep -q "Finished Backup" $logFile
then
- MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --backup | logger -t myth_mtc
+ MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --backup | $log
if [ $? = 0 ]
then
- echo "" | logger -t myth_mtc
+ echo "" | $log
else
- echo "Time Exceeded" | logger -t myth_mtc
+ echo "Time Exceeded" | $log
exit
fi
fi
if ! grep -q "Finished Update" $logFile
then
- MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --update | logger -t myth_mtc
+ MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --update | $log
if [ $? = 0 ]
then
- echo "" | logger -t myth_mtc
+ echo "" | $log
else
- echo "Time Exceeded" | logger -t myth_mtc
+ echo "Time Exceeded" | $log
exit
fi
fi
if grep -q "Finished Optimize" $logFile && grep -q "Finished Backup" $logFile && grep -q "Finished Update" $logFile
then
- echo "Finished Maintenance" | logger -t myth_mtc
+ echo "Finished Maintenance" | $log
fi
fi