Fix luci_forwarding with wrong configuration

This commit is contained in:
Albrecht Lohofener
2024-09-25 10:50:09 +02:00
parent 1eeb0e5db1
commit 3ee34dcb02
2 changed files with 9 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ set -Eeuo pipefail
info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n"; }
error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; }
warn () { printf "%b%s%b" "\E[1;31m❯ " "Warning: $1" "\E[0m\n" >&2; }
warn () { printf "%b%s%b" "\E[1;31m❯ " "Warning: $1" "\E[0m\n"; }
trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
+8 -10
View File
@@ -77,21 +77,19 @@ if [[ $FORWARD_LUCI = "true" ]]; then
if [[ $LAN_IF = "veth" ]]; then
info "Enable LuCI forwading to host LAN at port 9000"
multirun \
exec multirun \
"/var/lib/script-server-env/bin/python /usr/share/script-server/launcher.py -d /var/script-server" \
"nginx" \
"/run/run_openwrt.sh" \
"nsenter --target 1 --uts --net --ipc nginx -c /var/www/nginx-luci.conf"
else
error "LuCI forwading is only available if enviroment variable is set to LAN_IF: 'veth'"
warn "LuCI forwading is only available if enviroment variable is set to LAN_IF: 'veth'"
fi
else
fi
# Start processes
multirun \
"/var/lib/script-server-env/bin/python /usr/share/script-server/launcher.py -d /var/script-server" \
"nginx" \
"/run/run_openwrt.sh"
fi
# Start processes
exec multirun \
"/var/lib/script-server-env/bin/python /usr/share/script-server/launcher.py -d /var/script-server" \
"nginx" \
"/run/run_openwrt.sh"