Skip to content

Commit

Permalink
fix #1371
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 committed Jan 11, 2025
1 parent 6ec41a2 commit 3496a13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ services:
# - "ACME_OCSP_STAPLING=false" # enables ocsp stapling, default true, I recommend you to enable this if your CA supports it, supported by zerossl and google public ca, unsupported by letsencrypt certs created after May 7, 2025 (will create warning in your log, default value will change then)
# - "ACME_KEY_TYPE=rsa" # which key type to use ecdsa or rsa, default and recommended: ecdsa
# - "ACME_SERVER_TLS_VERIFY=false" # enables checking if ACME_SERVER has a valid TLS cert, default true
# - "PUID=1000" # set group id, default 0 (root)
# - "PGID=1000" # set user id, default 0 (root), requires PUID
# - "PUID=1000" # set group id, needs to be a number greater or equal to 99, or equal to 0, default 0 (root)
# - "PGID=1000" # set user id, needs to be a number greater or equal to 99, or equal to 0, default 0 (root), requires PUID to be not 0
# - "NIBEP=48682" # internal port of the NPMplus API, always bound to 127.0.0.1, default 48681, you need to change it, if you want to run multiple npm instances in network mode host
# - "GOAIWSP=48692" # internal port of goaccess, always bound to 127.0.0.1, default 48691, you need to change it, if you want to run multiple npm with goaccess instances in network mode host
# - "NPM_PORT=82" # Port the NPM UI should be bound to, default 81, you need to change it, if you want to run multiple npm instances in network mode host
Expand Down
18 changes: 12 additions & 6 deletions rootfs/usr/local/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,22 @@ fi


if ! echo "$PUID" | grep -q "^[0-9]\+$"; then
echo "PUID needs to be a number greater or equal to 1000, or equal to 0."
echo "PUID needs to be a number greater or equal to 99, or equal to 0."
sleep inf
fi

if [ "$PUID" -lt "99" ] && [ "$PUID" != "0" ]; then
echo "PUID needs to be a number greater or equal to 1000, or equal to 0."
echo "PUID needs to be a number greater or equal to 99, or equal to 0."
sleep inf
fi

if ! echo "$PGID" | grep -q "^[0-9]\+$"; then
echo "PGID needs to be a number greater or equal to 1000, or equal to 0."
echo "PGID needs to be a number greater or equal to 99, or equal to 0."
sleep inf
fi

if [ "$PGID" -lt "99" ] && [ "$PGID" != "0" ]; then
echo "PGID needs to be a number greater or equal to 1000, or equal to 0."
echo "PGID needs to be a number greater or equal to 99, or equal to 0."
sleep inf
fi

Expand Down Expand Up @@ -377,8 +377,14 @@ if echo "$GOACLA" | grep -vq "geoip-database"; then
if [ -s /data/etc/goaccess/geoip/GeoLite2-City.mmdb ] || [ -s /data/etc/goaccess/geoip/GeoLite2-Country.mmdb ]|| [ -s /data/etc/goaccess/geoip/GeoLite2-ASN.mmdb ]; then
echo "All goaccess geoip databases need to be moved from etc/goaccess/geoip to goaccess/geoip inside the mounted data folder!"
fi
if [ -s /data/goaccess/GeoLite2-City.mmdb ] && [ -s /data/goaccess/GeoLite2-Country.mmdb ] && [ -s /data/goaccess/GeoLite2-ASN.mmdb ]; then
export GOACLA="$GOACLA --geoip-database=/data/goaccess/geoip/GeoLite2-City.mmdb --geoip-database=/data/goaccess/geoip/GeoLite2-Country.mmdb --geoip-database=/data/goaccess/geoip/GeoLite2-ASN.mmdb"
if [ -s /data/goaccess/geoip/GeoLite2-City.mmdb ]; then
export GOACLA="$GOACLA --geoip-database=/data/goaccess/geoip/GeoLite2-City.mmdb"
fi
if [ -s /data/goaccess/geoip/GeoLite2-Country.mmdb ]; then
export GOACLA="$GOACLA --geoip-database=/data/goaccess/geoip/GeoLite2-Country.mmdb"
fi
if [ -s /data/goaccess/geoip/GeoLite2-ASN.mmdb ]; then
export GOACLA="$GOACLA --geoip-database=/data/goaccess/geoip/GeoLite2-ASN.mmdb"
fi
fi

Expand Down

0 comments on commit 3496a13

Please sign in to comment.