From 182f9bd8851ef209b42f29f38ddb66e3a04a52fa Mon Sep 17 00:00:00 2001 From: SoongJr <2505402+SoongJr@users.noreply.github.com> Date: Mon, 10 Jan 2022 22:25:15 +0100 Subject: [PATCH 1/3] fix update from pre-1.46 to post-1.46 not working in docker (#1406) Signed-off-by: SoongJr Signed-off-by: Stefano Guandalini --- updates/1.46.0.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/updates/1.46.0.sh b/updates/1.46.0.sh index 37b919904..c18c2dd5c 100644 --- a/updates/1.46.0.sh +++ b/updates/1.46.0.sh @@ -1,3 +1,6 @@ +#!/bin/bash + +set -e # docker images only [[ -f /.docker-image ]] && { @@ -8,7 +11,7 @@ ncc notify_push:self-test || { killall notify_push sleep 1 start_notify_push -}" +} EOF chmod +x /etc/cron.daily/refresh_notify_push } @@ -41,3 +44,6 @@ EOF systemctl enable refresh_notify_push.{path,service} systemctl restart refresh_notify_push.path } + + +exit 0 From e119607703512dfa2fb4c7ececff72212b48f3a4 Mon Sep 17 00:00:00 2001 From: Stefano Guandalini Date: Wed, 12 Jan 2022 18:47:00 +0100 Subject: [PATCH 2/3] Added dynu.com as dynamic DNS updater Signed-off-by: Stefano Guandalini --- bin/ncp/NETWORKING/dynuDNS.sh | 66 +++++++++++++++++++++++++++++++++++ etc/ncp-config.d/dynuDNS.cfg | 40 +++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 bin/ncp/NETWORKING/dynuDNS.sh create mode 100644 etc/ncp-config.d/dynuDNS.cfg diff --git a/bin/ncp/NETWORKING/dynuDNS.sh b/bin/ncp/NETWORKING/dynuDNS.sh new file mode 100644 index 000000000..ccbad0c77 --- /dev/null +++ b/bin/ncp/NETWORKING/dynuDNS.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# DynuDNS updater client installation on Raspbian +# +# Copyleft 2022 by Stefano Guandalini +# GPL licensed (see end of file) * Use at your own risk! +# + + + +install() +{ + apt-get update + apt-get install --no-install-recommends -y dnsutils +} + +configure() +{ + local updateurl=https://api.dynu.com/nic/update + local url="${updateurl}?hostname=${DOMAIN}&myipv6=${MYIPV6}&password=${PASSWORD}" + + [[ $ACTIVE != "yes" ]] && { + rm -f /etc/cron.d/dynuDNS + service cron restart + echo "dynuDNS client is disabled" + return 0 + } + + cat > /usr/local/bin/dynudns.sh < /etc/cron.d/dynuDNS + chmod 644 /etc/cron.d/dynuDNS + service cron restart + + set-nc-domain "$DOMAIN" + + echo "DynuDNS 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/etc/ncp-config.d/dynuDNS.cfg b/etc/ncp-config.d/dynuDNS.cfg new file mode 100644 index 000000000..e994544c5 --- /dev/null +++ b/etc/ncp-config.d/dynuDNS.cfg @@ -0,0 +1,40 @@ +{ + "id": "dynuDNS", + "name": "Dynamic DNS from dynuDNS", + "title": "dynuDNS", + "description": "DynuDNS DynamicDNS service", + "info": "Need account from https://www.dynu.com/", + "infotitle": "", + "params": [ + { + "id": "ACTIVE", + "name": "Active", + "value": "no", + "type": "bool" + }, + { + "id": "PASSWORD", + "name": "Password (better UpdateIP hashed)", + "value": "", + "suggest": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK1234567" + }, + { + "id": "MYIPV6", + "name": "IpV6 address", + "value": "no", + "suggest": "IpV6 address or 'no' not to update" + }, + { + "id": "DOMAIN", + "name": "Domain", + "value": "mynextcloud.example.com", + "suggest": "mynextcloud.example.com" + }, + { + "id": "UPDATEINTERVAL", + "name": "Update periodicity (in minutes)", + "value": "30", + "suggest": "30" + } + ] +} From e6399e77278126b980b34a3ef4bf66ef396a614e Mon Sep 17 00:00:00 2001 From: Stefano Guandalini Date: Wed, 12 Jan 2022 18:51:46 +0100 Subject: [PATCH 3/3] Aesthetics Signed-off-by: Stefano Guandalini --- etc/ncp-config.d/dynuDNS.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/ncp-config.d/dynuDNS.cfg b/etc/ncp-config.d/dynuDNS.cfg index e994544c5..7d66579e1 100644 --- a/etc/ncp-config.d/dynuDNS.cfg +++ b/etc/ncp-config.d/dynuDNS.cfg @@ -20,9 +20,9 @@ }, { "id": "MYIPV6", - "name": "IpV6 address", + "name": "IPv6 address (no == no update)", "value": "no", - "suggest": "IpV6 address or 'no' not to update" + "suggest": "IPv6 address or 'no' not to update" }, { "id": "DOMAIN",