mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
Added UPnP to access script (to support WireGuard plugin)
This commit is contained in:
@@ -15,6 +15,7 @@ fi
|
||||
[[ -z $USE_TELNET ]] && USE_TELNET=yes
|
||||
[[ -z $PORTTELNET ]] && PORTTELNET=23
|
||||
[[ -z $USE_SSH ]] && USE_SSH=yes
|
||||
[[ -z $USE_UPNP ]] && USE_UPNP=yes
|
||||
[[ -z $PORTSSH ]] && PORTSSH=22
|
||||
|
||||
# get management IP addresses
|
||||
@@ -57,6 +58,13 @@ else
|
||||
/etc/rc.d/rc.sshd stop >/dev/null
|
||||
fi
|
||||
|
||||
# enable/disable UPnP function
|
||||
if [[ $USE_UPNP == yes ]]; then
|
||||
[[ ! -x /usr/bin/upnpc ]] && chmod +x /usr/bin/upnpc
|
||||
else
|
||||
[[ -x /usr/bin/upnpc ]] && chmod -x /usr/bin/upnpc
|
||||
fi
|
||||
|
||||
# update TELNET listening port
|
||||
sed -ri "s/^(telnet\s+)[0-9]+\/(tcp|udp)\$/\1${PORTTELNET}\/\2/" $SERV
|
||||
|
||||
|
||||
Reference in New Issue
Block a user