diff --git a/README.md b/README.md index fdfcfb8..14a7377 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ services: - PUID=1001 - PGID=1001 - PORT=6969 + - CHMOD=771 # /var/www/html/4get volumes: # Optional, for custom banners and home.html - ./4get/banner:/var/www/html/4get/banner @@ -59,4 +60,4 @@ The included httpd.conf doesn't include a HTTPS setup. If you're unfamiliar with this stuff, I would recommend using [nginx-proxy-manager](https://github.com/NginxProxyManager/nginx-proxy-manager) and setting up HTTPS there. -You can then use nginx-proxy-manager to reverse proxy to your 4get service through your domain with HTTPS certs. \ No newline at end of file +You can then use nginx-proxy-manager to reverse proxy to your 4get service through your domain with HTTPS certs. diff --git a/entrypoint.sh b/entrypoint.sh index 6518872..d6989ea 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,15 +1,11 @@ #!/bin/sh set -e -# Default PUID and PGID -DEFAULT_PUID=1001 -DEFAULT_PGID=1001 -DEFAULT_PORT=80 - # Use provided PUID and PGID or fall back to defaults -PUID=${PUID:-$DEFAULT_PUID} -PGID=${PGID:-$DEFAULT_PGID} -PORT=${PORT:-$DEFAULT_PORT} +PUID=${PUID:-1001} +PGID=${PGID:-1001} +PORT=${PORT:-80} +CHMOD=${CHMOD:-771} echo "Creating container user & group \"abc\" with UID: ${PUID} and GID: ${PGID}..." groupadd -g $PGID abc @@ -20,7 +16,7 @@ php /gen_config.php echo "Setting 4get file permissions..." chown -R abc:abc /var/www/html/4get -chmod -R 771 /var/www/html/4get +chmod -R $CHMOD /var/www/html/4get echo "Changing port in /etc/apache2/httpd.conf to ${PORT}..." sed -i "s/^Listen .*/Listen ${PORT}/" /etc/apache2/httpd.conf