From 34f6116a6b533dc23101f7e96f669c6c00fb2201 Mon Sep 17 00:00:00 2001 From: Tom Duijf Date: Sat, 30 Mar 2024 17:02:27 +0100 Subject: [PATCH] Fix seafile-entrypoint, MYSQL_SERVER default empty if not set --- image/seafile/scripts/seafile-entrypoint.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/image/seafile/scripts/seafile-entrypoint.sh b/image/seafile/scripts/seafile-entrypoint.sh index 2084cd6..2175a94 100755 --- a/image/seafile/scripts/seafile-entrypoint.sh +++ b/image/seafile/scripts/seafile-entrypoint.sh @@ -98,15 +98,12 @@ choose_setup() { rm -f ${BASEPATH}/seafile-server-latest echo $VERSION > $DATADIR/current_version.tmp - set +u # If $MYSQL_SERVER is set, we assume MYSQL setup is intended, # otherwise sqlite - if [ -n "${MYSQL_SERVER}" ] + if [ -n "${MYSQL_SERVER:-}" ] then - set -u setup_mysql else - set -u setup_sqlite fi echo "Setup finished, storing current version $VERSION" @@ -398,7 +395,7 @@ maintenance(){ } wait_for_db(){ - if [ -n "${MYSQL_SERVER}" ]; then + if [ -n "${MYSQL_SERVER:-}" ]; then # Wait for MySQL to boot up DOCKERIZE_TIMEOUT=${DOCKERIZE_TIMEOUT:-"60s"} dockerize -timeout ${DOCKERIZE_TIMEOUT} -wait tcp://${MYSQL_SERVER}:${MYSQL_PORT:-3306} @@ -458,4 +455,4 @@ case $MODE in "stop") trapped ;; -esac \ No newline at end of file +esac