diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-10-27 19:45:34 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-10-27 19:46:06 +0300 |
commit | 36af04b8b1390f89bf5aac425e5abb134b1b7c01 (patch) | |
tree | f41d8024eaed4070d069f1c39fe0750ea7e1b35e | |
parent | a494e696c78d023d4552b7bfdc1d15963245087a (diff) |
nc-forward-ports: more info in outputv0.31.24
-rw-r--r-- | changelog.md | 6 | ||||
-rw-r--r-- | etc/nextcloudpi-config.d/nc-forward-ports.sh | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index d89f048b..46c5dab0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ -[v0.31.22](https://github.com/nextcloud/nextcloudpi/commit/0c7a7b8) (2017-10-25) wizard: chain configurations and improved feedback +[v0.31.24](https://github.com/nextcloud/nextcloudpi/commit/95a7165) (2017-10-27) nc-forward-ports: more info in output + +[v0.31.23](https://github.com/nextcloud/nextcloudpi/commit/defba33) (2017-10-27) nc-format-USB: more info in output + +[v0.31.22](https://github.com/nextcloud/nextcloudpi/commit/1968d88) (2017-10-25) wizard: chain configurations and improved feedback [v0.31.20](https://github.com/nextcloud/nextcloudpi/commit/df86a6f) (2017-10-26) nc-notify-updates: fix repeated lines diff --git a/etc/nextcloudpi-config.d/nc-forward-ports.sh b/etc/nextcloudpi-config.d/nc-forward-ports.sh index a60f292a..7c855d1c 100644 --- a/etc/nextcloudpi-config.d/nc-forward-ports.sh +++ b/etc/nextcloudpi-config.d/nc-forward-ports.sh @@ -37,8 +37,10 @@ configure() local IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(\.\d{1,3}){3}' | head -1 ) upnpc -d "$HTTPSPORT_" TCP upnpc -d "$HTTPPORT_" TCP - upnpc -a "$IP" 443 "$HTTPSPORT_" TCP | tee >(cat - >&2) | grep -q "is redirected to internal" || return 1 - upnpc -a "$IP" 80 "$HTTPPORT_" TCP | tee >(cat - >&2) | grep -q "is redirected to internal" || return 1 + upnpc -a "$IP" 443 "$HTTPSPORT_" TCP | tee >(cat - >&2) | grep -q "is redirected to internal" || \ + { echo -e "\nCould not forward ports automatically.\nDo it manually, or activate UPnP in your router and try again"; return 1; } + upnpc -a "$IP" 80 "$HTTPPORT_" TCP | tee >(cat - >&2) | grep -q "is redirected to internal" || \ + { echo -e "\nCould not forward ports automatically.\nDo it manually, or activate UPnP in your router and try again"; return 1; } } # License |