summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/etc_care.cron
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-02-19 18:16:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-02-19 18:16:16 (GMT)
commit8de064f6e96f960cdbfe6868d9957a4613f704df (patch)
tree4e73a420991733450d013529c0fee60e0365297a /abs/core/LinHES-system/etc_care.cron
parent0374b16f1e15ba1819b62bd5a6e0076ac7b243d0 (diff)
parent6fde8cd5e74f0840e01988e743464fe91c0a28f8 (diff)
downloadlinhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.zip
linhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.tar.gz
linhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/LinHES-system/etc_care.cron')
-rwxr-xr-xabs/core/LinHES-system/etc_care.cron16
1 files changed, 16 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/etc_care.cron b/abs/core/LinHES-system/etc_care.cron
new file mode 100755
index 0000000..97e0283
--- /dev/null
+++ b/abs/core/LinHES-system/etc_care.cron
@@ -0,0 +1,16 @@
+#!/bin/bash
+MYTH_RUN_STATUS=1
+. /etc/profile
+
+KeepBackups=4
+
+for f in "/etc/lircd.conf" "/etc/lircrc" "/etc/wol-lircrc" "/etc/remote.run" "/etc/asound.conf"
+do
+ NumBackups=`ls -d $f-* | wc -l`
+ if [[ $NumBackups -gt $KeepBackups ]]
+ then
+ echo "Deleting old $f-* files..."
+ numdel=$(($NumBackups-$KeepBackups))
+ rm -rf `ls -t $f-* | tail -$numdel`
+ fi
+done