Skip to content

Commit

Permalink
Fix wrong logic prestart (#5)
Browse files Browse the repository at this point in the history
* fix wrong logic in prestart script
  • Loading branch information
Sida Say authored Mar 22, 2021
1 parent 699bc18 commit 4ee76d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configs/app/prestart.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ "${DB_VENDOR}" = "mariadb" ] || [ "${DB_VENDOR}" = "mysql" ]; then
if { [ "${DB_VENDOR}" = "mariadb" ] || [ "${DB_VENDOR}" = "mysql" ]; } then
echo "Using $DB_VENDOR..."
[ -z "$DB_HOST" ] && echo "DB_HOST should be defined" && return 1
[ -z "$DB_USER" ] && echo "DB_USER should be defined" && return 1
Expand All @@ -22,7 +22,7 @@ if [ "${PI_SKIP_BOOTSTRAP}" = false ]; then
fi
pi-manage createdb
pi-manage db stamp head -d /usr/local/lib/privacyidea/migrations/
if [ -z ${PI_ADMIN_USER}] && [ -z ${PI_ADMIN_PASSWORD} ]; then
if { [ -z ${PI_ADMIN_USER} ] && [ -z ${PI_ADMIN_PASSWORD} ]; } then
echo "Create deafult admin user. Not recommented in production. Please set PI_ADMIN_USER and PI_ADMIN_PASSWORD in production enviroment."
pi-manage admin add admin -p privacyidea
else
Expand Down

0 comments on commit 4ee76d5

Please sign in to comment.