From 470a20e0869fe1d7e3dd07d5dcb8ca92c065eeec Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:48:07 +0200 Subject: [PATCH] Automatically adapt port --- gitea/rootfs/etc/cont-init.d/99-run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gitea/rootfs/etc/cont-init.d/99-run.sh b/gitea/rootfs/etc/cont-init.d/99-run.sh index c3bc57920..7db6492fd 100644 --- a/gitea/rootfs/etc/cont-init.d/99-run.sh +++ b/gitea/rootfs/etc/cont-init.d/99-run.sh @@ -7,6 +7,13 @@ if [ ! -f "$file" ]; then continue fi +############## +# ADAPT PORT # +############## + +sed -i "/HTTP_PORT/d" "$file" +sed -i "/server/a HTTP_PORT = $(bashio::addon.port 3000)" "$file" + ############## # OTHER CONF # ##############