mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-27 04:45:22 +00:00
Merge pull request #5334 from bill-mahoney/fix/atomic-ipv6-config-write
Fix silent nginx config corruption in 50-ipv6.sh
This commit is contained in:
@@ -25,7 +25,13 @@ process_folder () {
|
|||||||
for FILE in $FILES
|
for FILE in $FILES
|
||||||
do
|
do
|
||||||
echo "- ${FILE}"
|
echo "- ${FILE}"
|
||||||
echo "$(sed -E "$SED_REGEX" "$FILE")" > $FILE
|
TMPFILE="${FILE}.tmp"
|
||||||
|
if sed -E "$SED_REGEX" "$FILE" > "$TMPFILE" && [ -s "$TMPFILE" ]; then
|
||||||
|
mv "$TMPFILE" "$FILE"
|
||||||
|
else
|
||||||
|
echo "WARNING: skipping ${FILE} — sed produced empty output" >&2
|
||||||
|
rm -f "$TMPFILE"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# ensure the files are still owned by the npm user
|
# ensure the files are still owned by the npm user
|
||||||
|
|||||||
Reference in New Issue
Block a user