#!/bin/sh [ -n "$MYSQL_DATABASE" ] && sed -i -r "/db/s/=\s*'([^']*)'/= '${MYSQL_DATABASE}'/" onyx2/db/default.profile.php # superseed in onyx2/db/default.profile.php #[ -n "$MYSQL_HOST" ] && sed -i -r "/host/s/=\s*'([^']*)'/= '${MYSQL_HOST}'/" onyx2/db/default.profile.php [ -n "$MYSQL_USER" ] && sed -i -r "/user/s/=\s*'([^']*)'/= '${MYSQL_USER}'/" onyx2/db/default.profile.php [ -n "$MYSQL_PASSWORD" ] && sed -i -r "/pass/s/=\s*'([^']*)'/= '${MYSQL_PASSWORD}'/" onyx2/db/default.profile.php [ -n "$DISABLE_TLS" ] && sed -i -r "/preg_match/s/preg_match\('#^https:/preg_match('#^http:/" onyx2/include/common.php [ -n "$HB_ALLIANCE_NB_SIGNATURES" ] && sed -i -r "/nb_signatures/s/,\s*[0-9]+)/, ${HB_ALLIANCE_NB_SIGNATURES})/" onyx2/include/common.php [ -n "$HB_DEBUT_UNIVERS" ] && sed -i -r "/debut_d_univers/s/,\s*(true|false|TRUE|FALSE))/, ${HB_DEBUT_UNIVERS})/" onyx2/include/common.php [ -n "$HB_SERVER_NAME" ] && sed -i -r "/serveur_name/s/>(.*)${HB_SERVER_NAME}(.*)${HB_VITESSE}(.*)${HB_ENABLE_ATTAQUES}(.*)${HB_NB_AMAS}(.*)${HB_NB_SYSTEMS}(.*)${HB_NB_PLANETES}(.*)${HB_MAIL_ADMIN}(.*)${HB_MAIL_SUPPORT}Host/s/=\s*'(.*)'/='${SMTP_SERVER}'/" onyx2/include/server/inscription.php exec docker-php-entrypoint $@