From 5e6d32699d102bfdcfc090cae84613f10d712cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sun, 11 Dec 2016 09:49:57 +0100 Subject: [PATCH] fixes on postinstall & backup script --- contrib/backup/functions | 4 ++-- contrib/backup/zammad_backup.sh | 2 +- contrib/packager.io/functions | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/backup/functions b/contrib/backup/functions index 74330a544..aca469247 100644 --- a/contrib/backup/functions +++ b/contrib/backup/functions @@ -12,7 +12,7 @@ function get_backup_date () { } function delete_old_backups () { - find ${BACKUP_DIR}/*_zammad_*.gz -maxdepth 2 -mindepth 2 -type f -mtime +${HOLD_DAYS} -exec rm -r \; + find ${BACKUP_DIR}/*_zammad_*.gz -type f -mtime +${HOLD_DAYS} -exec rm -r \; } function get_db_credentials () { @@ -43,7 +43,7 @@ function backup_db () { mysqldump --opt --single-transaction ${DB_NAME} | gzip > ${BACKUP_DIR}/${TIMESTAMP}_zammad_db.mysql.gz elif [ "${DB_ADAPTER}" == "postgresql" ]; then su -c "pg_dump ${DB_NAME} | gzip > ${BACKUP_DIR}/${TIMESTAMP}_zammad_db.psql.gz" postgres - else + else echo "ADAPTER not found. if its sqlite backup is already saved in filebackup" fi } diff --git a/contrib/backup/zammad_backup.sh b/contrib/backup/zammad_backup.sh index bebc21b3d..e0047a4a6 100755 --- a/contrib/backup/zammad_backup.sh +++ b/contrib/backup/zammad_backup.sh @@ -17,7 +17,7 @@ delete_old_backups if [ -f ${ZAMMAD_DIR}/${DATABASE_CONFIG} ]; then get_db_credentials else - echo "${ZAMMAD_DIR}//${DATABASE_CONFIG} is missing. is zammad configured yet?" + echo "${ZAMMAD_DIR}/${DATABASE_CONFIG} is missing. is zammad configured yet?" exit 1 fi diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index ba5440b78..8e8080286 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -228,5 +228,3 @@ function final_message () { fi echo -e "####################################################################################" } - -function \ No newline at end of file