Update 50-ipv6.sh

This commit is contained in:
ian351c 2024-06-05 11:56:55 -04:00 committed by GitHub
parent c1e3701944
commit 0232ebf3ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,6 +10,7 @@ log_info 'IPv6 ...'
# Lowercase
DISABLE_IPV6=$(echo "${DISABLE_IPV6:-}" | tr '[:upper:]' '[:lower:]')
SKIP_FILE_OWNERSHIP=$(echo "${SKIP_FILE_OWNERSHIP:-}" | tr '[:upper:]' '[:lower:]')
process_folder () {
FILES=$(find "$1" -type f -name "*.conf")
@ -31,8 +32,12 @@ process_folder () {
echo "$(sed -E "$SED_REGEX" "$FILE")" > $FILE
done
if [ "$SKIP_FILE_OWNERSHIP" == "true" ] || [ "$SKIP_FILE_OWNERSHIP" == "on" ] || [ "$SKIP_FILE_OWNERSHIP" == "1" ] || [ "$SKIP_FILE_OWNERSHIP" == "yes" ]; then
log_info 'Skipping ownership, use only with caution ...'
else
# ensure the files are still owned by the npm user
chown -R "$PUID:$PGID" "$1"
fi
}
process_folder /etc/nginx/conf.d