Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2021-10-18 17:07:20 +0300
committernachoparker <nacho@ownyourbits.com>2021-10-18 17:34:47 +0300
commitd12b30c7ebb865f5ee5f2a295167f535b8cbef05 (patch)
tree99d1c4c8b3e7f183511ae57c9a2d2f4035a3ac84 /install.sh
parent78a88ebb478831423a9e02ab38cf4a9c015df94e (diff)
build: check for existing NC database
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index f85c1bf0..29b61269 100644
--- a/install.sh
+++ b/install.sh
@@ -25,7 +25,8 @@ trap "rm -rf \"${TMPDIR}\"" 0 1 2 3 15
export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}"
# check installed software
-type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<"
+type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<"
+type mysqld &>/dev/null && mysql -e 'use nextcloud' &>/dev/null && { echo "The 'nextcloud' database already exists. Aborting"; exit 1; }
# get dependencies
apt-get update