mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-22 18:45:25 +00:00
Test webui table existancy before add
This commit is contained in:
parent
b8e14d26c5
commit
350219ddd9
@ -61,8 +61,10 @@ fi
|
|||||||
# Default port for WEB_UI
|
# Default port for WEB_UI
|
||||||
[ -z "${WEBUI_PORT}" ] && WEBUI_PORT="8080"
|
[ -z "${WEBUI_PORT}" ] && WEBUI_PORT="8080"
|
||||||
|
|
||||||
|
if ! grep "webui" /etc/iproute2/rt_tables > /dev/null;then
|
||||||
echo "[info] Setup route table for webui" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[info] Setup route table for webui" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
echo "${WEBUI_PORT} webui" >> /etc/iproute2/rt_tables
|
echo "${WEBUI_PORT} webui" >> /etc/iproute2/rt_tables
|
||||||
|
fi
|
||||||
|
|
||||||
ip route flush table ${WEBUI_PORT}
|
ip route flush table ${WEBUI_PORT}
|
||||||
ip route add ${LAN_NETWORK} dev eth0 table ${WEBUI_PORT}
|
ip route add ${LAN_NETWORK} dev eth0 table ${WEBUI_PORT}
|
||||||
|
Loading…
Reference in New Issue
Block a user