Skip to content

Commit

Permalink
Merge pull request #1 from tomduijf/mysql_server_var
Browse files Browse the repository at this point in the history
Fix seafile-entrypoint, MYSQL_SERVER default empty if not set
  • Loading branch information
h44z authored Aug 13, 2024
2 parents f074edb + 34f6116 commit 9964cfc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions image/seafile/scripts/seafile-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -458,4 +455,4 @@ case $MODE in
"stop")
trapped
;;
esac
esac

0 comments on commit 9964cfc

Please sign in to comment.