From 5f29a8f6a1f321b82d0b3cd06bccd15475bd5583 Mon Sep 17 00:00:00 2001 From: mbugeia Date: Tue, 18 Oct 2016 00:01:49 +0200 Subject: [PATCH] Use default value to to prevent bad behavior if not set --- scripts/backup | 2 +- scripts/install | 2 +- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/backup b/scripts/backup index f2a09d9..380dd9b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -3,7 +3,7 @@ set -eu # Set app specific variables -app="gogs" +app=${APPNAME:-gogs} dbname=$app dbuser=$app diff --git a/scripts/install b/scripts/install index d46d97d..697935d 100644 --- a/scripts/install +++ b/scripts/install @@ -12,7 +12,7 @@ is_public=$4 source ./_common.sh # Set app specific variables -app=$APPNAME +app=${APPNAME:-gogs} dbname=$app dbuser=$app diff --git a/scripts/remove b/scripts/remove index 16ba888..c79e0be 100644 --- a/scripts/remove +++ b/scripts/remove @@ -4,7 +4,7 @@ source ./_common.sh # Set app specific variables -app=$APPNAME +app=${APPNAME:-gogs} dbname=$app dbuser=$app diff --git a/scripts/restore b/scripts/restore index 6177844..9ac4245 100644 --- a/scripts/restore +++ b/scripts/restore @@ -3,7 +3,7 @@ set -eu # Set app specific variables -app="gogs" +app=${APPNAME:-gogs} dbname=$app dbuser=$app diff --git a/scripts/upgrade b/scripts/upgrade index c1f85cd..a245738 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -6,7 +6,7 @@ set -eu source ./_common.sh # Set app specific variables -app=$APPNAME +app=${APPNAME:-gogs} dbname=$app dbuser=$app