mirror of
https://github.com/Sabai-Technologies/sogo-docker.git
synced 2026-01-23 08:32:23 +00:00
init MySQL database only if MYSQL_SERVER is filled
This commit is contained in:
parent
179be6694b
commit
c5b642ab4f
1 changed files with 5 additions and 3 deletions
|
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/local/bin/common.sh
|
||||
source /usr/local/bin/mysql.sh
|
||||
|
||||
for conf in $(printenv| grep -i SOGO_ | cut -d= -f1);do
|
||||
update_conf "${conf:5}" "${!conf}"
|
||||
done
|
||||
|
||||
wait_for_db
|
||||
init_db
|
||||
if [[ -n ${MYSQL_SERVER//[[:blank:]]/} ]]; then
|
||||
source /usr/local/bin/mysql.sh
|
||||
wait_for_db
|
||||
init_db
|
||||
fi
|
||||
|
||||
log_info "Launching SOGo"
|
||||
/usr/sbin/sogod -WONoDetach YES -WOPort 20000 -WOLogFile - -WOPidFile /tmp/sogo.pid
|
||||
Loading…
Add table
Add a link
Reference in a new issue