diff --git a/Dockerfile b/Dockerfile index e6e2741..994eb68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -99,7 +99,7 @@ RUN set -ex ; \ ln -sf /opt/echoip/echoip /usr/local/bin/echoip ; \ ln -sf /opt/echoip/echoip /usr/local/bin/ifconfig ; \ sed -i "s|REPLACE_MODIFIED|$(date +'%Y-%m-%d at %H:%M')|g" /opt/echoip/html/index.html; \ - bash -c "/tmp/init.sh" + bash -c "/tmp/update-geoip-db.sh" RUN set -ex ; \ echo 'Running cleanup' ; \ diff --git a/rootfs/tmp/init.sh b/rootfs/tmp/update-geoip-db.sh similarity index 80% rename from rootfs/tmp/init.sh rename to rootfs/tmp/update-geoip-db.sh index 49dd6d6..b1b38af 100755 --- a/rootfs/tmp/init.sh +++ b/rootfs/tmp/update-geoip-db.sh @@ -32,10 +32,6 @@ RUN_USER="${SUDO_USER:-$USER}" SRC_DIR="${BASH_SOURCE%/*}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set bash options -trap 'exitCode=${exitCode:-$?};[ -n "$INIT_SH_TEMP_FILE" ] && [ -f "$INIT_SH_TEMP_FILE" ] && rm -Rf "$INIT_SH_TEMP_FILE" &>/dev/null' EXIT -#if [ ! -t 0 ] && { [[ "$1" = --term ]] || [ $# = 0 ]; }; then shift 1 && TERMINAL_APP="TRUE" myterminal -e "$APPNAME $*" && exit || exit 1; fi -[ "$1" = "--debug" ] && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on" -[ "$1" = "--raw" ] && export SHOW_RAW="true" set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for f in GeoLite2-ASN GeoLite2-City GeoLite2-Country; do diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index 2a39e22..19407ff 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -9,11 +9,11 @@ # @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments # @@Created : Sunday, Sep 10, 2023 22:52 EDT # @@File : docker-entrypoint -# @@Description : +# @@Description : # @@Changelog : New script # @@TODO : Better documentation -# @@Other : -# @@Resource : +# @@Other : +# @@Resource : # @@Terminal App : no # @@sudo/root : no # @@Template : other/docker-entrypoint @@ -76,9 +76,9 @@ WWW_ROOT_DIR="" # set default web dir DATABASE_DIR="" # set database dir # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Healthcheck variables -HEALTH_ENABLED="yes" # enable healthcheck [yes/no] -SERVICES_LIST="tini" # comma seperated list of processes for the healthcheck -HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test] +HEALTH_ENABLED="yes" # enable healthcheck [yes/no] +SERVICES_LIST="tini echoip" # comma seperated list of processes for the healthcheck +HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test] # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Overwrite variables diff --git a/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh b/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh index 9dc830e..f51261b 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh @@ -119,7 +119,7 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='ifconfig' # command to execute +EXEC_CMD_BIN='echoip ' # command to execute EXEC_CMD_ARGS='-r -s -p -l :$SERVICE_PORT -H X-Real-IP -H x-forwarded-for ' # command arguments EXEC_CMD_ARGS+='-t /opt/echoip/html ' # command arguments EXEC_CMD_ARGS+='-a /opt/echoip/geoip/GeoLite2-ASN.mmdb ' # command arguments