Skip to content

Commit 288c0c0

Browse files
committed
Do not try to fix custom nginx files. If they are mounted by Docker, sed will fail with 'Ressource busy'.
1 parent 195f320 commit 288c0c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rootfs/etc/cont-init.d/nginx-proxy-manager.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ touch /config/log/nginx/manager.log
6868
[ ! -L /config/logs ] || rm /config/logs
6969

7070
# Fix any references to the old log path.
71-
if ls /config/nginx/*/*.conf >/dev/null 2>&1; then
72-
sed -i 's|/data/logs/|/config/log/|' /config/nginx/*/*.conf
73-
fi
71+
find /config/nginx -not \( -path /config/nginx/custom -prune \) -type f -name '*.conf' | while read file
72+
do
73+
sed -i 's|/data/logs/|/config/log/|' "$file"
74+
done
7475

7576
# Install default config.
7677
[ -f /config/nginx/ip_ranges.conf ] || cp /defaults/ip_ranges.conf /config/nginx/

0 commit comments

Comments
 (0)