Skip to content

Commit

Permalink
Merge pull request #30 from startersclan/fix/fix-docker-entrypoint.sh…
Browse files Browse the repository at this point in the history
…-bugs-when-using-listen-ip-or-listen-port

Fix: Fix `docker-entrypoint.sh` bugs when using `LISTEN_IP` or `LISTEN_PORT`
  • Loading branch information
leojonathanoh authored Oct 29, 2023
2 parents 12c3a53 + d8143e1 commit dd2ab93
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 44 deletions.
6 changes: 2 additions & 4 deletions generate/templates/docker-entrypoint.sh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
6 changes: 2 additions & 4 deletions variants/v1.6.19-emailsender-alpine-3.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
6 changes: 2 additions & 4 deletions variants/v1.6.19-geoip-alpine-3.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
6 changes: 2 additions & 4 deletions variants/v1.6.19-geoip-geoip2-alpine-3.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down
6 changes: 2 additions & 4 deletions variants/v1.6.19-geoip-ubuntu-16.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ if [ ! -z "${LOG_LEVEL}" ]; then
fi
fi
[ ! -z "${MODE}" ] && set "$@" "--db-host=${MODE}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--ip=${LISTEN_PORT}"
[ ! -z "${DB_HOST}" ] && set "$@" "--db-host=${DB_HOST}"
[ ! -z "${DB_NAME}" ] && set "$@" "--db-name=${DB_NAME}"
[ ! -z "${DB_USER}" ] && set "$@" "--db-username=${DB_USER}"
[ ! -z "${DB_PASSWORD}" ] && set "$@" "--db-password=${DB_PASSWORD}"
[ "${DNS_RESOLVE_IP}" = 'false' ] && set "$@" "--nodns-resolveip"
[ ! -z "${DNS_RESOLVE_IP_TIMEOUT}" ] && set "$@" "--dns-timeout=${DNS_RESOLVE_IP_TIMEOUT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--db-password=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--db-password=${LISTEN_PORT}"
[ ! -z "${LISTEN_IP}" ] && set "$@" "--ip=${LISTEN_IP}"
[ ! -z "${LISTEN_PORT}" ] && set "$@" "--port=${LISTEN_PORT}"
[ "${RCON}" = 'false' ] && set "$@" "--norcon"
[ "${STDIN}" = 'true' ] && set "$@" "--stdin"
[ ! -z "${STDIN_SERVER_IP}" ] && set "$@" "--server-ip=${STDIN_SERVER_IP}"
Expand Down

0 comments on commit dd2ab93

Please sign in to comment.