summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2019-03-24 22:28:59 (GMT)
committerBritney Fransen <brfransen@gmail.com>2019-03-24 22:28:59 (GMT)
commitd601102e2c3d90e1f072c8bfeb04cff28eb7d181 (patch)
tree2814b808255410752c9f97ae92cb644c69a16067 /abs/core
parentd105a1464fb9798d7a2409846f7400f64b0183d6 (diff)
downloadlinhes_pkgbuild-d601102e2c3d90e1f072c8bfeb04cff28eb7d181.zip
linhes_pkgbuild-d601102e2c3d90e1f072c8bfeb04cff28eb7d181.tar.gz
linhes_pkgbuild-d601102e2c3d90e1f072c8bfeb04cff28eb7d181.tar.bz2
LinHES-system: lh_system_backup_job: check for home dirs before tar
Diffstat (limited to 'abs/core')
-rwxr-xr-xabs/core/LinHES-system/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-system/lh_system_backup_job11
2 files changed, 12 insertions, 3 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index a236769..3d0b412 100755
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=8.6.0
-pkgrel=1
+pkgrel=2
arch=('x86_64')
install=system.install
pkgdesc="Everything that makes LinHES an automated system"
@@ -97,7 +97,7 @@ md5sums=('c6e6b83a1f4c35ef4501e277657ab2ac'
'33fbebbd546672cedd3c5e7350ab414e'
'c773d8caacba8fbd4968e8afe5137bc6'
'3edef50a49a47694bf8add39cc160add'
- '01cbbf411d2a585feb71f2881755e5d8'
+ '88c9c36430875f9530edb79e11dc770a'
'f421f670a9c74724037f70d1dabcad00'
'eab2d188992b1ac561e0ba968544d7a3'
'74e17d6f7453c52d56fecaed5c3f6ad5'
diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job
index 8539ff2..e248e1a 100755
--- a/abs/core/LinHES-system/lh_system_backup_job
+++ b/abs/core/LinHES-system/lh_system_backup_job
@@ -117,7 +117,16 @@ function backup(){
done
echo "Backup home dirs"
- tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME /home/vncsvc /home/xymon
+ HOMEDIRS=""
+ if [ -d /home/vncsvc ]
+ then
+ HOMEDIRS="/home/vncsvc"
+ fi
+ if [ -d /home/xymon ]
+ then
+ HOMEDIRS="$HOMEDIRS /home/xymon"
+ fi
+ tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME $HOMEDIRS
if [ -f $MYTHHOME/backup_config/backup_include.txt ]
then