Skip to content

Commit

Permalink
Update start.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Dec 31, 2024
1 parent 27ef023 commit 8ac3503
Showing 1 changed file with 50 additions and 90 deletions.
140 changes: 50 additions & 90 deletions rootfs/usr/local/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ if [ "$HTTP_PORT" = "$HTTPS_PORT" ] && [ "$DISABLE_HTTP" = "false" ]; then
fi


if ! echo "$IPV4_BINDING" | grep -q "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
if ! echo "$IPV4_BINDING" | grep -q "^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$"; then
echo "IPV4_BINDING needs to be a IPv4-Address: four blocks of numbers separated by dots."
sleep inf
fi

if ! echo "$NPM_IPV4_BINDING" | grep -q "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
if ! echo "$NPM_IPV4_BINDING" | grep -q "^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$"; then
echo "NPM_IPV4_BINDING needs to be a IPv4-Address: four blocks of numbers separated by dots."
sleep inf
fi

if ! echo "$GOA_IPV4_BINDING" | grep -q "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
if ! echo "$GOA_IPV4_BINDING" | grep -q "^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$"; then
echo "GOA_IPV4_BINDING needs to be a IPv4-Address: four blocks of numbers separated by dots."
sleep inf
fi
Expand Down Expand Up @@ -423,7 +423,7 @@ if [ "$PHP82" = "true" ]; then
fi
mkdir -vp /data/php
cp -varnT /etc/php82 /data/php/82
sed -i "s|listen =.*|listen = /run/php82.sock|" /data/php/82/php-fpm.d/www.conf
sed -i "s|#\?listen =.*|listen = /run/php82.sock|" /data/php/82/php-fpm.d/www.conf
sed -i "s|;error_log =.*|error_log = /proc/self/fd/2|g" /data/php/82/php-fpm.conf
sed -i "s|include=.*|include=/data/php/82/php-fpm.d/*.conf|g" /data/php/82/php-fpm.conf
elif [ "$FULLCLEAN" = "true" ]; then
Expand All @@ -449,7 +449,7 @@ if [ "$PHP83" = "true" ]; then
fi
mkdir -vp /data/php
cp -varnT /etc/php83 /data/php/83
sed -i "s|listen =.*|listen = /run/php83.sock|" /data/php/83/php-fpm.d/www.conf
sed -i "s|#\?listen =.*|listen = /run/php83.sock|" /data/php/83/php-fpm.d/www.conf
sed -i "s|;error_log =.*|error_log = /proc/self/fd/2|g" /data/php/83/php-fpm.conf
sed -i "s|include=.*|include=/data/php/83/php-fpm.d/*.conf|g" /data/php/83/php-fpm.conf
elif [ "$FULLCLEAN" = "true" ]; then
Expand All @@ -475,7 +475,7 @@ if [ "$PHP84" = "true" ]; then
fi
mkdir -vp /data/php
cp -varnT /etc/php84 /data/php/84
sed -i "s|listen =.*|listen = /run/php84.sock|" /data/php/84/php-fpm.d/www.conf
sed -i "s|#\?listen =.*|listen = /run/php84.sock|" /data/php/84/php-fpm.d/www.conf
sed -i "s|;error_log =.*|error_log = /proc/self/fd/2|g" /data/php/84/php-fpm.conf
sed -i "s|include=.*|include=/data/php/84/php-fpm.d/*.conf|g" /data/php/84/php-fpm.conf
elif [ "$FULLCLEAN" = "true" ]; then
Expand Down Expand Up @@ -709,92 +709,65 @@ cp -va /usr/local/nginx/conf/conf.d/include/coreruleset/plugins/* /data/etc/mods

sed -i "s|48683|$NIBEP|g" /app/index.js
sed -i "s|48683|$NIBEP|g" /usr/local/nginx/conf/conf.d/npm.conf

sed -i "s|48693|$GOAIWSP|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf

find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?listen [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:80/listen $IPV4_BINDING:$HTTP_PORT/g" {} \;
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?listen [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:443/listen $IPV4_BINDING:$HTTPS_PORT/g" {} \;

if [ "$DISABLE_IPV6" = "true" ]; then
sed -i "s|ipv6=on;|ipv6=off;|g" /usr/local/nginx/conf/nginx.conf
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" {} \;
else
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $IPV6_BINDING:\2/g" {} \;
fi

sed -i "s/#\?listen \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:\)\?\([0-9]\+\)/listen $NPM_IPV4_BINDING:$NPM_PORT/g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s/#\?listen \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:\)\?\([0-9]\+\)/listen $NPM_IPV4_BINDING:$NPM_PORT/g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf

if [ "$NPM_DISABLE_IPV6" = "true" ]; then
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
else
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $NPM_IPV6_BINDING:$NPM_PORT/g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $NPM_IPV6_BINDING:$NPM_PORT/g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
fi

sed -i "s/#\?listen \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:\)\?\([0-9]\+\)/listen $GOA_IPV4_BINDING:$GOA_PORT/g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s/#\?listen \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:\)\?\([0-9]\+\)/listen $GOA_IPV4_BINDING:$GOA_PORT/g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf

if [ "$GOA_DISABLE_IPV6" = "true" ]; then
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
sed -i "s|#\?listen 0.0.0.0:80|listen $IPV4_BINDING:$HTTP_PORT|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?listen 0.0.0.0:443 ssl|listen $IPV4_BINDING:$HTTPS_PORT ssl|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
if [ "$DISABLE_H3_QUIC" = "true" ]; then
sed -i "s|#\?listen 0.0.0.0:443 quic|#listen $IPV4_BINDING:$HTTPS_PORT quic|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|more_set_headers 'Alt-Svc: h3=\":[0-9]\+\"; ma=86400';|more_set_headers 'Alt-Svc: h3=\":$HTTPS_PORT\"; ma=86400';|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
else
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $GOA_IPV6_BINDING:$GOA_PORT/g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $GOA_IPV6_BINDING:$GOA_PORT/g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
sed -i "s|#\?listen 0.0.0.0:443 quic|#listen $IPV4_BINDING:$HTTPS_PORT quic|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?more_set_headers 'Alt-Svc: h3=\":[0-9]\+\"; ma=86400';|#more_set_headers 'Alt-Svc: h3=\":$HTTPS_PORT\"; ma=86400';|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
fi
sed -i "s|#\?listen 0.0.0.0:81|listen $NPM_IPV4_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|#\?listen 0.0.0.0:81|listen $NPM_IPV4_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|#\?listen 0.0.0.0:91|listen $GOA_IPV4_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|#\?listen 0.0.0.0:91|listen $GOA_IPV4_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf

if [ "$DISABLE_HTTP" = "true" ]; then
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|#\1|g" {} \;
elif [ "$DISABLE_IPV6" = "true" ]; then
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:80\)|\1|g" {} \;
if [ "$DISABLE_IPV6" = "true" ]; then
sed -i "s|ipv6=on;|ipv6=off;|g" /usr/local/nginx/conf/nginx.conf
sed -i "s|#\?listen \[::\]:80|#listen $IPV6_BINDING:$HTTP_PORT|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?listen \[::\]:443|#listen $IPV6_BINDING:$HTTPS_PORT|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?listen \[::\]:81|#listen $NPM_IPV6_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|#\?listen \[::\]:81|#listen $NPM_IPV6_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|#\?listen \[::\]:91|#listen $GOA_IPV6_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|#\?listen \[::\]:91|#listen $GOA_IPV6_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
else
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|\1|g" {} \;
if [ "$DISABLE_HTTP" = "true" ]; then
sed -i "s|#\?listen \[::\]:80|#listen $IPV6_BINDING:$HTTP_PORT|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
else
sed -i "s|#\?listen \[::\]:80|listen $IPV6_BINDING:$HTTP_PORT|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
fi
sed -i "s|#\?listen \[::\]:443 ssl|listen $IPV6_BINDING:$HTTPS_PORT ssl|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
if [ "$DISABLE_H3_QUIC" = "true" ]; then
sed -i "s|#\?listen \[::\]:443 quic|#listen $IPV6_BINDING:$HTTPS_PORT quic|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
else
sed -i "s|#\?listen \[::\]:443 quic|#listen $IPV6_BINDING:$HTTPS_PORT quic|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
fi
sed -i "s|#\?listen \[::\]:81|listen $NPM_IPV6_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|#\?listen \[::\]:81|listen $NPM_IPV6_BINDING:$NPM_PORT|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|#\?listen \[::\]:91|listen $GOA_IPV6_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|#\?listen \[::\]:91|listen $GOA_IPV6_BINDING:$GOA_PORT|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
fi

if [ "$DISABLE_H3_QUIC" = "true" ]; then
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*quic\)|#\1|g" {} \;
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(more_set_headers 'Alt-Svc: h3=\":443\"; ma=86400';\)|#\1|g" {} \;
elif [ "$DISABLE_IPV6" = "true" ]; then
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+.*quic\)|\1|g" {} \;
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(more_set_headers 'Alt-Svc: h3=\":443\"; ma=86400';\)|\1|g" {} \;
else
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*quic\)|\1|g" {} \;
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(more_set_headers 'Alt-Svc: h3=\":443\"; ma=86400';\)|\1|g" {} \;
fi

if [ "$NGINX_QUIC_BPF" = "true" ]; then
sed -i "s|quic_bpf.*|quic_bpf on;|g" /usr/local/nginx/conf/nginx.conf
else
sed -i "s|quic_bpf.*|quic_bpf off;|g" /usr/local/nginx/conf/nginx.conf
if [ "$NGINX_QUIC_BPF" = "true" ]; then
sed -i "s|quic_bpf.*|quic_bpf on;|g" /usr/local/nginx/conf/nginx.conf
fi

if [ "$NGINX_LOG_NOT_FOUND" = "true" ]; then
sed -i "s|log_not_found.*|log_not_found on;|g" /usr/local/nginx/conf/nginx.conf
else
sed -i "s|log_not_found.*|log_not_found off;|g" /usr/local/nginx/conf/nginx.conf
fi

if [ "$NGINX_404_REDIRECT" = "true" ]; then
sed -i "s|#error_page 404|error_page 404|g" /usr/local/nginx/conf/nginx.conf
else
sed -i "s|error_page 404|#error_page 404|g" /usr/local/nginx/conf/nginx.conf
fi

if [ "$NGINX_DISABLE_PROXY_BUFFERING" = "true" ]; then
sed -i "s|proxy_buffering.*|proxy_buffering off;|g" /usr/local/nginx/conf/nginx.conf
sed -i "s|proxy_request_buffering.*|proxy_request_buffering off;|g" /usr/local/nginx/conf/nginx.conf
else
sed -i "s|proxy_buffering.*|proxy_buffering on;|g" /usr/local/nginx/conf/nginx.conf
sed -i "s|proxy_request_buffering.*|proxy_request_buffering on;|g" /usr/local/nginx/conf/nginx.conf
fi

if [ "$LOGROTATE" = "true" ]; then
sed -i "s|access_log off; # http|access_log /data/nginx/access.log log;|g" /usr/local/nginx/conf/nginx.conf
sed -i "s|access_log off; # stream|access_log /data/nginx/stream.log proxy;|g" /usr/local/nginx/conf/nginx.conf
else
sed -i "s|access_log /data/nginx/access.log log;|access_log off; # http|g" /usr/local/nginx/conf/nginx.conf
sed -i "s|access_log /data/nginx/stream.log proxy;|access_log off; # stream|g" /usr/local/nginx/conf/nginx.conf
fi


Expand Down Expand Up @@ -903,6 +876,7 @@ else
rm -vrf /data/tls/dummycert.pem /data/tls/dummykey.pem
fi


sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /app/templates/default.conf
sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /app/templates/default.conf
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
Expand All @@ -918,49 +892,34 @@ sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /usr/local
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
sed -i "s|tls-ciphers-no-stapling.conf;|tls-ciphers.conf;|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|ssl_stapling_file $DEFAULT_STAPLING_FILE;|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
else
sed -i "s|tls-ciphers.conf;|tls-ciphers-no-stapling.conf;|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /usr/local/nginx/conf/conf.d/no-server-name.conf
fi

sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /usr/local/nginx/conf/conf.d/npm.conf
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
sed -i "s|tls-ciphers-no-stapling.conf;|tls-ciphers.conf;|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|#\?ssl_stapling_file .*|ssl_stapling_file $DEFAULT_STAPLING_FILE;|g" /usr/local/nginx/conf/conf.d/npm.conf
else
sed -i "s|tls-ciphers.conf;|tls-ciphers-no-stapling.conf;|g" /usr/local/nginx/conf/conf.d/npm.conf
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /usr/local/nginx/conf/conf.d/npm.conf
fi

sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
sed -i "s|tls-ciphers-no-stapling.conf;|tls-ciphers.conf;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|ssl_stapling_file $DEFAULT_STAPLING_FILE;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
else
sed -i "s|tls-ciphers.conf;|tls-ciphers-no-stapling.conf;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
fi

sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
sed -i "s|tls-ciphers-no-stapling.conf;|tls-ciphers.conf;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|#\?ssl_stapling_file .*|ssl_stapling_file $DEFAULT_STAPLING_FILE;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
else
sed -i "s|tls-ciphers.conf;|tls-ciphers-no-stapling.conf;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /usr/local/nginx/conf/conf.d/include/goaccess.conf
fi

sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
sed -i "s|ssl_certificate_key .*|ssl_certificate_key $DEFAULT_KEY;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
if [ -n "$DEFAULT_STAPLING_FILE" ]; then
sed -i "s|tls-ciphers-no-stapling.conf;|tls-ciphers.conf;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|ssl_stapling_file $DEFAULT_STAPLING_FILE;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
else
sed -i "s|tls-ciphers.conf;|tls-ciphers-no-stapling.conf;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /usr/local/nginx/conf/conf.d/include/goaccess-no-server-name.conf
fi

sed -i "s|ssl_certificate .*|ssl_certificate $DEFAULT_CERT;|g" /data/nginx/default.conf
Expand All @@ -973,6 +932,7 @@ else
sed -i "s|#\?ssl_stapling_file .*|#ssl_stapling_file ;|g" /data/nginx/default.conf
fi


if [ "$GOA" = "true" ]; then
mkdir -vp /data/etc/goaccess/data /data/etc/goaccess/geoip
cp -va /usr/local/nginx/conf/conf.d/include/goaccess.conf /usr/local/nginx/conf/conf.d/goaccess.conf
Expand Down Expand Up @@ -1023,16 +983,16 @@ if [ "$PUID" != "0" ]; then
-not \( -uid "$PUID" -and -gid "$PGID" \) \
-exec chown "$PUID:$PGID" {} \;
if [ "$PHP82" = "true" ]; then
sed -i "s|user =.*|;user = root|" /data/php/82/php-fpm.d/www.conf
sed -i "s|group =.*|;group = root|" /data/php/82/php-fpm.d/www.conf
sed -i "s|;\?user =.*|;user = root|" /data/php/82/php-fpm.d/www.conf
sed -i "s|;\?group =.*|;group = root|" /data/php/82/php-fpm.d/www.conf
fi
if [ "$PHP83" = "true" ]; then
sed -i "s|user =.*|;user = root|" /data/php/83/php-fpm.d/www.conf
sed -i "s|group =.*|;group = root|" /data/php/83/php-fpm.d/www.conf
sed -i "s|;\?user =.*|;user = root|" /data/php/83/php-fpm.d/www.conf
sed -i "s|;\?group =.*|;group = root|" /data/php/83/php-fpm.d/www.conf
fi
if [ "$PHP84" = "true" ]; then
sed -i "s|user =.*|;user = root|" /data/php/84/php-fpm.d/www.conf
sed -i "s|group =.*|;group = root|" /data/php/84/php-fpm.d/www.conf
sed -i "s|;\?user =.*|;user = root|" /data/php/84/php-fpm.d/www.conf
sed -i "s|;\?group =.*|;group = root|" /data/php/84/php-fpm.d/www.conf
fi
sed -i "s|#\?user root;|#user root;|g" /usr/local/nginx/conf/nginx.conf
exec su-exec "$PUID:$PGID" launch.sh
Expand Down

0 comments on commit 8ac3503

Please sign in to comment.