From d60dc74257d81d2b04bc5d4b7a1566683a3c3a00 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 9 Mar 2014 20:35:10 -0300 Subject: Support for debian and wiki at backup-site --- share/hydractl/backup-site | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'share/hydractl/backup-site') diff --git a/share/hydractl/backup-site b/share/hydractl/backup-site index ec1f8f3..32c4284 100755 --- a/share/hydractl/backup-site +++ b/share/hydractl/backup-site @@ -36,10 +36,14 @@ if [ -z "$SITE" ]; then fi # Determine site location. -if [ "$SITE" == "git" ] && [ "$SITE" == "svn" ]; then - LOCATION="/var" +if [ "$SITE" == "git" ] || [ "$SITE" == "svn" ]; then + LOCATION="/var/$SITE" +elif [ "$SITE" == "debian" ]; then + LOCATION="/var/reprepro" +elif [ "$SITE" == "wiki" ]; then + LOCATION="/var/www/data/wiki/" else - LOCATION="$SITES" + LOCATION="$SITES/$SITE" fi # Set backups user. @@ -94,7 +98,7 @@ fi # Backup site if [ -d "$SITES/$SITE" ]; then echo "Backing up site folder..." - tar jcvf $PACK $LOCATION/$SITE + tar jcvf $PACK $LOCATION md5sum $PACK > $PACK.md5 sha1sum $PACK > $PACK.sha1 chown root.$BACKUPS_GROUP $PACK* -- cgit v1.2.3