Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com>2018-09-16 00:25:44 +0300
committernacho <nacho@ownyourbits.com>2018-09-16 19:20:53 +0300
commit3479014e79c5aff5687be85bf9b3c3f991e06ded (patch)
tree25668c5c286d2fd02392b4e6c63aaf661dbff22c
parent241f2e053140e1c0804c3840f263a5ccdaa1b023 (diff)
spDYN: support IPv6v0.59.13
-rw-r--r--changelog.md6
-rw-r--r--etc/ncp-config.d/DDNS_spDYN.sh20
2 files changed, 18 insertions, 8 deletions
diff --git a/changelog.md b/changelog.md
index 0efa0243..717cd47e 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 f9dcd471..baa79e3b 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