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:
authorHuizerd <15855769+Huizerd@users.noreply.github.com>2020-09-16 11:26:49 +0300
committernachoparker <nacho@ownyourbits.com>2021-05-13 06:49:42 +0300
commit7aef967f09935b20b75645c94bc0867241567a7c (patch)
tree14440448dd7ba8aab389c44ab4daf5bd691bb0f3
parent8d76a6b849309c6fe6a1dfeb198183488edc99e0 (diff)
Namecheap dynamic DNS clientv1.36.0
Signed-off-by: Huizerd <15855769+Huizerd@users.noreply.github.com>
-rw-r--r--README.md1
-rw-r--r--bin/ncp/NETWORKING/namecheapDNS.sh75
-rw-r--r--changelog.md12
-rw-r--r--etc/ncp-config.d/namecheapDNS.cfg47
-rw-r--r--i18n/README-zh_TW.md1
5 files changed, 133 insertions, 3 deletions
diff --git a/README.md b/README.md
index d6aa4647..a4b59029 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ Find the full documentation at [docs.nextcloudpi.com](http://docs.nextcloudpi.co
* Dynamic DNS support for freeDNS
* Dynamic DNS support for duckDNS
* Dynamic DNS support for spDYN
+ * Dynamic DNS support for Namecheap
* dnsmasq DNS server with DNS cache
* ModSecurity Web Application Firewall
* NFS ready to mount your files over LAN
diff --git a/bin/ncp/NETWORKING/namecheapDNS.sh b/bin/ncp/NETWORKING/namecheapDNS.sh
new file mode 100644
index 00000000..a8cca390
--- /dev/null
+++ b/bin/ncp/NETWORKING/namecheapDNS.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+# Namecheap DNS updater client installation on Raspbian
+#
+# Copyleft 2020 by ndunks and Huizerd
+# GPL licensed (see end of file) * Use at your own risk!
+#
+# Based on:
+# - https://gist.github.com/ndunks/c756030c0757b667c9a478c97ca5a9b7
+# - https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-do-i-use-a-browser-to-dynamically-update-the-hosts-ip
+#
+# Further steps to be taken:
+# - Buying a Namecheap domain
+# - https://www.namecheap.com/support/knowledgebase/article.aspx/595/11/how-do-i-enable-dynamic-dns-for-a-domain/
+# - https://www.namecheap.com/support/knowledgebase/article.aspx/43/11/how-do-i-set-up-a-host-for-dynamic-dns
+
+
+install()
+{
+ apt-get update
+ apt-get install --no-install-recommends -y dnsutils
+}
+
+configure()
+{
+ local updateurl=https://dynamicdns.park-your-domain.com/update
+ local url="${updateurl}?host=${HOST}&domain=${DOMAIN}&password=${PASSWORD}"
+
+ [[ $ACTIVE != "yes" ]] && {
+ rm -f /etc/cron.d/namecheapDNS
+ service cron restart
+ echo "Namecheap DNS client is disabled"
+ return 0
+ }
+
+ cat > /usr/local/bin/namecheapdns.sh <<EOF
+#!/bin/bash
+echo "Namecheap DNS client started"
+registeredIP=\$(dig +short "$FULLDOMAIN"|tail -n1)
+currentIP=\$(wget -q -O - http://checkip.dyndns.org|sed s/[^0-9.]//g)
+echo "${url}&ip=${currentIP}"
+ [ "\$currentIP" != "\$registeredIP" ] && {
+ wget -q -O /dev/null "${url}&ip=${currentIP}"
+ }
+echo "Registered IP: \$registeredIP | Current IP: \$currentIP"
+EOF
+ chmod +744 /usr/local/bin/namecheapdns.sh
+
+ echo "*/${UPDATEINTERVAL} * * * * root /bin/bash /usr/local/bin/namecheapdns.sh" > /etc/cron.d/namecheapDNS
+ chmod 644 /etc/cron.d/namecheapDNS
+ service cron restart
+
+ cd /var/www/nextcloud
+ sudo -u www-data php occ config:system:set trusted_domains 3 --value="$FULLDOMAIN"
+ sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://"$FULLDOMAIN"/
+
+ echo "Namecheap DNS client is enabled"
+}
+
+# License
+#
+# This script is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This script is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this script; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA
diff --git a/changelog.md b/changelog.md
index 82c7e6e2..274e403f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v1.35.2](https://github.com/nextcloud/nextcloudpi/commit/3f345eb) (2021-04-29) ncp-web: fix display of big files for 32 bit
+[v1.36.0](https://github.com/nextcloud/nextcloudpi/commit/5709e46) (2020-09-16) Namecheap dynamic DNS client
+
+[v1.35.2](https://github.com/nextcloud/nextcloudpi/commit/bfab195) (2021-04-29) ncp-web: fix display of big files for 32 bit
[v1.35.1 ](https://github.com/nextcloud/nextcloudpi/commit/e64ca34) (2021-04-29) ncp-web: fix backup download for big files in 32-bit
@@ -25,6 +27,8 @@
[v1.34.0 ](https://github.com/nextcloud/nextcloudpi/commit/ec428a2) (2021-01-01) upgrade to NC20.0.4
+[v1.33.2 ](https://github.com/nextcloud/nextcloudpi/commit/82d00c8) (2021-01-01) ncp-config: fix empty values
+
[v1.33.1 ](https://github.com/nextcloud/nextcloudpi/commit/42fd597) (2020-12-12) nc-update-nc: improve error messages
[v1.33.0 ](https://github.com/nextcloud/nextcloudpi/commit/ffd0b44) (2020-12-10) upgrade to NC20.0.3
@@ -39,9 +43,11 @@
[v1.30.0 ](https://github.com/nextcloud/nextcloudpi/commit/f00fe21) (2020-09-19) upgrade to NC19.0.2
-[v1.29.10](https://github.com/nextcloud/nextcloudpi/commit/82baebf) (2020-09-03) ncp-web: added a lot of german locales
+[v1.29.11](https://github.com/nextcloud/nextcloudpi/commit/82baebf) (2020-09-03) ncp-web: added a lot of german locales
+
+[v1.29.10](https://github.com/nextcloud/nextcloudpi/commit/3706ed0) (2020-09-12) nc-previews: fix killing generate-all
-[v1.29.9 ](https://github.com/nextcloud/nextcloudpi/commit/3706ed0) (2020-09-12) nc-previews: fix killing generate-all
+[v1.29.9 ](https://github.com/nextcloud/nextcloudpi/commit/9d65011) (2020-09-07) nc-restore: also set tempdirectory
[v1.29.8 ](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk)
diff --git a/etc/ncp-config.d/namecheapDNS.cfg b/etc/ncp-config.d/namecheapDNS.cfg
new file mode 100644
index 00000000..30023594
--- /dev/null
+++ b/etc/ncp-config.d/namecheapDNS.cfg
@@ -0,0 +1,47 @@
+{
+ "id": "namecheapDNS",
+ "name": "Dynamic DNS from Namecheap",
+ "title": "namecheapDNS",
+ "description": "Namecheap Dynamic DNS service (need domain from https://www.namecheap.com/)",
+ "info": "First, complete these steps: https://www.namecheap.com/support/knowledgebase/article.aspx/595/11/how-do-i-enable-dynamic-dns-for-a-domain/ and https://www.namecheap.com/support/knowledgebase/article.aspx/43/11/how-do-i-set-up-a-host-for-dynamic-dns",
+ "infotitle": "",
+ "params": [
+ {
+ "id": "ACTIVE",
+ "name": "Active",
+ "value": "no",
+ "type": "bool"
+ },
+ {
+ "id": "PASSWORD",
+ "name": "Password",
+ "value": "",
+ "suggest": "your_ddns_password",
+ "type": "password"
+ },
+ {
+ "id": "FULLDOMAIN",
+ "name": "Full domain name",
+ "value": "",
+ "suggest": "mynextcloud.example.com"
+ },
+ {
+ "id": "HOST",
+ "name": "Host name",
+ "value": "",
+ "suggest": "mynextcloud"
+ },
+ {
+ "id": "DOMAIN",
+ "name": "Domain name",
+ "value": "",
+ "suggest": "example.com"
+ },
+ {
+ "id": "UPDATEINTERVAL",
+ "name": "Update interval (minutes)",
+ "value": "30",
+ "suggest": "30"
+ }
+ ]
+}
diff --git a/i18n/README-zh_TW.md b/i18n/README-zh_TW.md
index 189f4c1f..f906f2d6 100644
--- a/i18n/README-zh_TW.md
+++ b/i18n/README-zh_TW.md
@@ -51,6 +51,7 @@ NextCloudPi 是專門為 Raspberry Pi、Odroid HC1、rock64 以及其它單板
* 可使用freeDNS 所提供的浮動IP連結功能
* 可使用duckDNS 所提供的浮動IP連結功能
* 可使用spDYN 所提供的浮動IP連結功能
+ * 可使用Namecheap DNS 所提供的浮動IP連結功能
* 內建 dnsmasq DNS 伺服器快取
* ModSecurity 網路應用程式防火牆
* NFS ready to mount your files over LAN