Skip to content

Commit

Permalink
noip: manage many interfaces and fix return value
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Nov 8, 2017
1 parent 3147047 commit 455cb73
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

[v0.32.6](https://github.com/nextcloud/nextcloudpi/commit/83adc32) (2017-11-08) noip: manage many interfaces and fix return value

[v0.32.5 ](https://github.com/nextcloud/nextcloudpi/commit/f192b20) (2017-11-08) update: wait running apt processes

[v0.32.4 ](https://github.com/nextcloud/nextcloudpi/commit/63e0f73) (2017-11-08) fail2ban: update logpath on nc-datadir or nc-restore

[v0.32.3 ](https://github.com/nextcloud/nextcloudpi/commit/bfe0b61) (2017-11-06) nc-notify-updates: rework for more accuracy

[v0.32.2 ](https://github.com/nextcloud/nextcloudpi/commit/d46f567) (2017-11-04) ncp-web: fix return value

[v0.32.1 ](https://github.com/nextcloud/nextcloudpi/commit/8f28660) (2017-11-04) build: replace user pi for user ncp
Expand Down
7 changes: 6 additions & 1 deletion etc/nextcloudpi-config.d/no-ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ configure()

ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; return 1; echo "noip DDNS disabled"; }

/usr/local/bin/noip2 -C -c /usr/local/etc/no-ip2.conf -U "$TIME_" -u "$USER_" -p "$PASS_" || return 1
local IF=$( ip -br l | awk '{ if ( $2 == "UP" ) print $1 }' | head -1 )
[[ "$IF" != "" ]] && IF="-I $IF"

/usr/local/bin/noip2 -C -c /usr/local/etc/no-ip2.conf $IF -U "$TIME_" -u "$USER_" -p "$PASS_" | tee >(cat - >&2) \
| grep -q "New configuration file .* created" || return 1

update-rc.d noip2 enable
service noip2 restart
cd /var/www/nextcloud
Expand Down
2 changes: 1 addition & 1 deletion lamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ EOF

configure() { :; }

cleanup()
cleanup()
{
apt-get autoremove -y
apt-get clean
Expand Down

0 comments on commit 455cb73

Please sign in to comment.