Bring up to recent v2 changes around s6

This commit is contained in:
Jamie Curnow committed 2023-05-11 10:55:30 +10:00
1 parent e7ef809b10
commit fb8ca0b02f
19 files changed
+175 -62

No files matched your search

@@ -1,8 +1,11 @@
#!/bin/bash
#!/command/with-contenv bash
# shellcheck shell=bash
# This command reads the `DISABLE_IPV6` env var and will either enable
# or disable ipv6 in all nginx configs based on this setting.
set -e
log_info 'IPv6 ...'
# Lowercase
@@ -12,13 +15,13 @@ process_folder () {
FILES=$(find "$1" -type f -name "*.conf")
SED_REGEX=
if [ "$(disable_ipv6)" == '1' ]; then
if [ "$DISABLE_IPV6" == "true" ] || [ "$DISABLE_IPV6" == "on" ] || [ "$DISABLE_IPV6" == "1" ] || [ "$DISABLE_IPV6" == "yes" ]; then
# IPV6 is disabled
echo "❯ Disabling IPV6 in hosts in: $1"
echo "Disabling IPV6 in hosts in: $1"
SED_REGEX='s/^([^#]*)listen \[::\]/\1#listen [::]/g'
else
# IPV6 is enabled
echo "❯ Enabling IPV6 in hosts in: $1"
echo "Enabling IPV6 in hosts in: $1"
SED_REGEX='s/^(\s*)#listen \[::\]/\1listen [::]/g'
fi
@@ -28,7 +31,7 @@ process_folder () {
sed -E -i "$SED_REGEX" "$FILE" || true
done
# ensure the files are still owned by the npmuser
# ensure the files are still owned by the npm user
chown -R "$PUID:$PGID" "$1"
}