add CHMOD option
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user