summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-08-09 05:58:50 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-08-09 05:58:50 (GMT)
commit9152c2dfbc73080d6c9aba33ac27df9cdcf86f41 (patch)
treeb79017997159b240d4c3c072d8ae6b000d68c7f0
parent6df792244a366dca60e2cccb12efae45d60a0de0 (diff)
downloadlinhes_pkgbuild-9152c2dfbc73080d6c9aba33ac27df9cdcf86f41.zip
linhes_pkgbuild-9152c2dfbc73080d6c9aba33ac27df9cdcf86f41.tar.gz
linhes_pkgbuild-9152c2dfbc73080d6c9aba33ac27df9cdcf86f41.tar.bz2
LinHES-system:updated myth_mtc.sh to use log in /var/log/mythtv. Added logrotation configuration file.
-rw-r--r--abs/core-testing/LinHES-system/PKGBUILD7
-rw-r--r--abs/core-testing/LinHES-system/myth_mtc.lr9
-rwxr-xr-xabs/core-testing/LinHES-system/myth_mtc.sh11
3 files changed, 18 insertions, 9 deletions
diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD
index 55e294a..8a2518f 100644
--- a/abs/core-testing/LinHES-system/PKGBUILD
+++ b/abs/core-testing/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=1.0
-pkgrel=61
+pkgrel=63
arch=('i686')
MVDIR=$startdir/pkg/usr/LH
BINDIR=$startdir/pkg/usr/bin
@@ -8,7 +8,7 @@ install=LinHES.install
pkgdesc="scripts and things related to having a automated system"
depends=(linhes-sounds xdotool)
backup=(etc/modprobe.d/alsa-base)
-binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh"
+binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh myth_mtc.lr"
source=(LinHES-session LinHES-profile.sh $binfiles alsa-base)
@@ -36,6 +36,7 @@ do
done
install -m755 -D $startdir/src/alsa-base $startdir/pkg/etc/modprobe.d/alsa-base
-
+mkdir $startdir/pkg/etc/logrotate.d
+cp $startdir/myth_mtc.lr $startdir/pkg/etc/logrotate.d
}
diff --git a/abs/core-testing/LinHES-system/myth_mtc.lr b/abs/core-testing/LinHES-system/myth_mtc.lr
new file mode 100644
index 0000000..23f8711
--- /dev/null
+++ b/abs/core-testing/LinHES-system/myth_mtc.lr
@@ -0,0 +1,9 @@
+/var/log/mythtv/myth_mtc.log {
+ copytruncate
+ daily
+ size 10M
+ missingok
+ rotate 7
+ compress
+ notifempty
+}
diff --git a/abs/core-testing/LinHES-system/myth_mtc.sh b/abs/core-testing/LinHES-system/myth_mtc.sh
index 89ed37d..487513b 100755
--- a/abs/core-testing/LinHES-system/myth_mtc.sh
+++ b/abs/core-testing/LinHES-system/myth_mtc.sh
@@ -1,13 +1,12 @@
#!/bin/bash
. /etc/profile
+logFile='/var/log/mythtv/myth_mtc.log'
date=`date +%Y-%m-%d`
-mkdir /var/log/$date
-myth_mtc.py > /var/log/$date/myth_mtc.log
+
+myth_mtc.py > $logFile 2>&1
if [ $? = 0 ]
then
- echo "Finished" >> /var/log/$date/myth_mtc.log
+ echo "Finished $date" >> $logFile
else
- echo "Time Exceede" >> /var/log/$date/myth_mtc.log
+ echo "Time Exceede $date" >> $logFile
fi
-
-