diff --git a/changelog.md b/changelog.md index 0efa02433..717cd47e8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ -[v0.59.12](https://github.com/nextcloud/nextcloudpi/commit/5fc8986) (2018-09-07) Change email program from PHP to Sendmail +[v0.59.13](https://github.com/nextcloud/nextcloudpi/commit/3ccf987) (2018-09-15) spDYN: support IPv6 + +[v0.59.12](https://github.com/nextcloud/nextcloudpi/commit/241f2e0) (2018-09-07) Change email program from PHP to Sendmail [v0.59.11](https://github.com/nextcloud/nextcloudpi/commit/5be7866) (2018-09-16) lamp: add referrer policy for enhanced privacy @@ -7,7 +9,7 @@ [v0.59.9 ](https://github.com/nextcloud/nextcloudpi/commit/6a755c3) (2018-09-16) nc-prettyURL: fixes -[v0.59.8](https://github.com/nextcloud/nextcloudpi/commit/a00cd0b) (2018-09-15) nc-format-USB: drive number was off by one (#631) +[v0.59.8 ](https://github.com/nextcloud/nextcloudpi/commit/a00cd0b) (2018-09-15) nc-format-USB: drive number was off by one (#631) [v0.59.7 ](https://github.com/nextcloud/nextcloudpi/commit/e26a834) (2018-08-22) Rename DDNS apps so they show up together diff --git a/etc/ncp-config.d/DDNS_spDYN.sh b/etc/ncp-config.d/DDNS_spDYN.sh index f9dcd4719..baa79e3ba 100644 --- a/etc/ncp-config.d/DDNS_spDYN.sh +++ b/etc/ncp-config.d/DDNS_spDYN.sh @@ -12,6 +12,7 @@ ACTIVE_=no DOMAIN_=mycloud.spdns.de TOKEN_=your-spdns-token +IPv6_=no INSTALLDIR=spdnsupdater INSTALLPATH=/usr/local/etc/$INSTALLDIR @@ -38,8 +39,15 @@ install() ### Configuration +IPv6_=$3 + # Get current IP address from -get_ip_url="https://api.ipify.org/" +if [[ $IPv6 == "yes" ]]; then + get_ip_url="https://myexternalip.com/raw" +else + get_ip_url="https://api.ipify.org/" +fi + update_url="https://update.spdyn.de/nic/update" @@ -78,7 +86,7 @@ function spdnsUpdater { } -if [ $# -eq 2 ] +if [ $# -eq 3 ] then # if hostname and token # Get current IP address @@ -87,14 +95,14 @@ if [ $# -eq 2 ] token=$2 params="-d hostname=$host -d myip=$currip -d user=$host -d pass=$token" spdnsUpdater "$params" - elif [ $# -eq 3 ] + elif [ $# -eq 4 ] then # if hostname and user and passwd # Get current IP address currip=$(curl -s "$get_ip_url"); host=$1 user=$2 - pass=$3 + pass=$4 params="-d hostname=$host -d myip=$currip -d user=$user -d pass=$pass" spdnsUpdater "$params" else @@ -122,11 +130,11 @@ configure() # Adds file to cron to run script for DNS record updates and change permissions touch $CRONFILE - echo "0 * * * * root $INSTALLPATH/spdnsUpdater.sh $DOMAIN_ $TOKEN_ >/dev/null 2>&1" > "$CRONFILE" + echo "0 * * * * root $INSTALLPATH/spdnsUpdater.sh $DOMAIN_ $TOKEN_ $IPv6_ >/dev/null 2>&1" > "$CRONFILE" chmod +x "$CRONFILE" # First-time execution of update script and print response from spdns.de server - "$INSTALLPATH"/spdnsUpdater.sh "$DOMAIN_" "$TOKEN_" + "$INSTALLPATH"/spdnsUpdater.sh "$DOMAIN_" "$TOKEN_" "IPv6_" # Removes config files and cron job if ACTIVE_ is set to no elif [[ $ACTIVE_ == "no" ]]; then