diff options
author | atom long | 2023-03-07 23:43:20 +0800 |
---|---|---|
committer | atom long | 2023-03-07 23:48:22 +0800 |
commit | 5e936055987448a81fdfb178819ebf410ea0b0e3 (patch) | |
tree | b249399a1208f064cb749312f4b6c75b85e429f3 | |
parent | 785e67809d1f1005522eff410de2f5adbc60b977 (diff) | |
download | aur-5e936055987448a81fdfb178819ebf410ea0b0e3.tar.gz |
update to latest reversion
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0001-Makefile-Support-staged-installs-with-DESTDIR.patch | 25 | ||||
-rw-r--r-- | 0002-send-mail-via-curl-command.patch | 59 | ||||
-rw-r--r-- | PKGBUILD | 8 |
4 files changed, 47 insertions, 53 deletions
@@ -1,7 +1,7 @@ pkgbase = freenom-script pkgdesc = Freenom.com Domain Renewal and Dynamic DNS script. - pkgver = 20210824 - pkgrel = 4 + pkgver = 20230226 + pkgrel = 1 url = https://github.com/mkorthof/freenom-script install = freenom-script.install arch = any @@ -12,7 +12,7 @@ pkgbase = freenom-script source = 0001-Makefile-Support-staged-installs-with-DESTDIR.patch source = 0002-send-mail-via-curl-command.patch md5sums = SKIP - md5sums = 1747aec87824ab195db8a39803fc8d49 - md5sums = be0f303a84acd3b6a8a5388bc17e3813 + md5sums = 1bcaf7df11f92cdcb4f39499e3ec824a + md5sums = cb5b77eba766c5a36ede21abba6db514 pkgname = freenom-script diff --git a/0001-Makefile-Support-staged-installs-with-DESTDIR.patch b/0001-Makefile-Support-staged-installs-with-DESTDIR.patch index 4c54579be05c..cbdb66c8331e 100644 --- a/0001-Makefile-Support-staged-installs-with-DESTDIR.patch +++ b/0001-Makefile-Support-staged-installs-with-DESTDIR.patch @@ -1,7 +1,7 @@ -From e6360fe304fb49dcca4f09028a033eb14d65e887 Mon Sep 17 00:00:00 2001 -From: atomlong <atom.long@hotmail.com> -Date: Tue, 14 Sep 2021 15:07:39 +0800 -Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use +From 2cc15262d098737a6c99475336b4a3861f5227f7 Mon Sep 17 00:00:00 2001 +From: atom long <atom.long@hotmail.com> +Date: Tue, 7 Mar 2023 23:22:47 +0800 +Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use `DESTDIR` in install related targets to support [*staged installs*][1]. make DESTDIR=/tmp/stage install @@ -12,7 +12,7 @@ Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile -index 6c1dafc..79b19ed 100644 +index 810601a..932eb3c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ @@ -29,24 +29,19 @@ index 6c1dafc..79b19ed 100644 ifneq ("$(shell grep ^staff: /etc/group)", "") GROUP = staff -@@ -11,14 +11,14 @@ else +@@ -11,9 +11,9 @@ else GROUP = root endif EXISTCRON = 0 -ifneq ("$(wildcard /run/systemd/system)", "") +ifneq ("$(wildcard /usr/lib/systemd/system)", "") SCHED = systemd - # ifneq ("$(wildcard /usr/lib/systemd/system)","") - # SYSDDIR = /lib/systemd/system - # else ifneq ("$(wildcard /lib/systemd/system)","") - # SYSDDIR = /usr/lib/systemd/system - # endif - LISTUNITS := $(shell systemctl list-unit-files --no-legend --no-page "freenom-*" 2>/dev/null|cut -d" " -f1) + LISTUNITS := $(shell ls $(SYSDDIR)/freenom-* 2>/dev/null) else ifneq ("$(shell which cron 2>/dev/null)", "") EXISTCRON = 1 SCHED = cron -@@ -50,12 +50,14 @@ ifeq ("$(wildcard $(SCRIPT))","") +@@ -45,12 +45,14 @@ ifeq ("$(wildcard $(SCRIPT))","") $(error ERROR: Installation File "$(SCRIPT)" not found) endif ifeq ("$(EXISTCONF)", "0") @@ -61,7 +56,7 @@ index 6c1dafc..79b19ed 100644 $(shell install -C -m 755 -o root -g $(GROUP) $(SCRIPT) $(INSTDIR)) else $(info File "$(INSTDIR)/$(SCRIPT)" already exists) -@@ -68,7 +70,8 @@ ifeq ("$(SCHED)", "systemd") +@@ -63,7 +65,8 @@ ifeq ("$(SCHED)", "systemd") ifneq ("$(LISTUNITS)", "") $(info Systemd unit files already installed) else @@ -71,7 +66,7 @@ index 6c1dafc..79b19ed 100644 $(shell systemctl daemon-reload) ifeq ("$(wildcard $(SYSDDIR)/freenom-*)","") $(info To schedule domain renewals and updates, use these commands:) -@@ -82,7 +85,7 @@ else ifeq ("$(SCHED)", "cron") +@@ -77,7 +80,7 @@ else ifeq ("$(SCHED)", "cron") ifeq ("$(wildcard cron.d/freenom)","") $(error ERROR: Installation path "cron.d/freenom/*" not found) else @@ -81,5 +76,5 @@ index 6c1dafc..79b19ed 100644 $(info $() $() * replace example.tk with your domain and uncomment line(s)) $(info See README.md for details) -- -2.33.0.windows.2 +2.39.2 diff --git a/0002-send-mail-via-curl-command.patch b/0002-send-mail-via-curl-command.patch index b59660a16c6a..b898badda30c 100644 --- a/0002-send-mail-via-curl-command.patch +++ b/0002-send-mail-via-curl-command.patch @@ -1,34 +1,34 @@ -From 3060b7171a5108bcddf8e9a8af8dd625a9f3fcdb Mon Sep 17 00:00:00 2001 -From: atomlong <atom.long@hotmail.com> -Date: Tue, 14 Sep 2021 16:04:31 +0800 +From 49d6d0809e7f81107623d1258bc59a63c77a2f80 Mon Sep 17 00:00:00 2001 +From: atom long <atom.long@hotmail.com> +Date: Tue, 7 Mar 2023 23:33:41 +0800 Subject: [PATCH 2/2] send mail via curl command. MTA is not needed anymore. --- CHANGES.md | 1 + README.md | 3 +- freenom.conf | 14 +++++---- - freenom.sh | 81 +++++++++++++++++++++++++++++++++++++++++++--------- - 4 files changed, 80 insertions(+), 19 deletions(-) + freenom.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++-------- + 4 files changed, 80 insertions(+), 18 deletions(-) diff --git a/CHANGES.md b/CHANGES.md -index a7667bd..f3c39cf 100644 +index bfae997..4ae2699 100644 --- a/CHANGES.md +++ b/CHANGES.md -@@ -2,6 +2,7 @@ - - _order: latest/newest on top_ - +@@ -14,6 +14,7 @@ _order: latest/newest on top_ + - `APPRISE="/usr/local/bin/apprise"` + - `APPRISE_SERVER_URLS=( )` + - [**20211207**] fixed issue [#52](https://github.com/mkorthof/freenom-script/issues/52): sed removes CR using \r instead of ^M +- [**20210914**] send mail via curl command. - - [**20210821**] fix issue [#50](https://github.com/mkorthof/freenom-script/issues/50) + - [**20210821**] fixed issue [#50](https://github.com/mkorthof/freenom-script/issues/50) - [**20210618**] added more config checks (PR [#43](https://github.com/mkorthof/freenom-script/issues/43) from nathanfranke) - [**20210612**] check for uaString and ipCmd settings ([#42](https://github.com/mkorthof/freenom-script/issues/42)) diff --git a/README.md b/README.md -index 43dbcb2..4db7c77 100644 +index cc3da5e..a9157f7 100644 --- a/README.md +++ b/README.md -@@ -58,7 +58,8 @@ NOTES: +@@ -57,7 +57,8 @@ Examples ./freenom.sh -r example.com - ## Installation + Using a full Linux distro including coreutils is recommended (e.g. Debian). Embedded and BusyBox based systems are untested and will probably not work correctly or at all. -_Note that this shell script requires recent versions of "Bash" and "cURL"_ +_Note that this shell script requires recent versions of "Bash" and "cURL"; @@ -37,12 +37,12 @@ index 43dbcb2..4db7c77 100644 ### Auto Installer diff --git a/freenom.conf b/freenom.conf -index 2dea46d..a8acb52 100644 +index 29806ac..ac7b60f 100644 --- a/freenom.conf +++ b/freenom.conf -@@ -101,15 +101,19 @@ ipCmd+=("dig -4 +short whoami.akamai.net @ns1-1.akamaitech.net") - # MAIL # - ######## +@@ -102,15 +102,19 @@ ipCmd+=("dig -4 +short whoami.akamai.net @ns1-1.akamaitech.net") + # Mail Notifications # + ###################### -# Mail Transfer Agent. A lightweight send-only MTA such as SSMTP should work fine. Or leave empty to disable sending mail. -# If you do not have a MTA installed you can use "bashmail.sh": https://git.io/JJdto. Default is "/usr/sbin/sendmail" @@ -63,13 +63,13 @@ index 2dea46d..a8acb52 100644 -#MAILFROM="Freenom Script <freenom-script@example.com>" +#MAILFROM="Freenom Script <${MAILUSERNAME}>" - ###################### - # Domain name and id # + ######################### + # Apprise Notifications # diff --git a/freenom.sh b/freenom.sh -index 01ed3fe..5ec1ea3 100755 +index c30f28a..8a114a3 100755 --- a/freenom.sh +++ b/freenom.sh -@@ -159,15 +159,6 @@ if [ -z "$RCPTTO" ]; then +@@ -169,14 +169,6 @@ if [ -z "$RCPTTO" ]; then RCPTTO="$freenom_email" fi @@ -78,14 +78,13 @@ index 01ed3fe..5ec1ea3 100755 - MTA="/usr/sbin/sendmail" - else - MTA="" -- echo "Warning: no MTA found, cant send email" +- echo "Warning: No MTA found, cant send email" - fi -fi -- + # set a few general variables - c_opts="--connect-timeout 30 --compressed -L -s" -@@ -476,22 +467,86 @@ func_sleep () { +@@ -483,22 +475,86 @@ func_sleep() { fi } @@ -154,7 +153,7 @@ index 01ed3fe..5ec1ea3 100755 +} + # Function mailEvent: send mail - # parameters: $1: event 2: $messages + # parameters: $1: $event 2: $messages mailEvent() { - if [ "$MTA" != "" ] && [ "$RCPTTO" != "" ]; then + if [ "$MAILUSERNAME" != "" ] && [ "$MAILPASSWD" != "" ]; then @@ -163,11 +162,11 @@ index 01ed3fe..5ec1ea3 100755 + echo "DEBUG: $(date '+%H:%M:%S') email $pad4 HOSTNAME=$HOSTNAME RCPTTO=$RCPTTO 1=$1 2=$2" fi [ "$debug" -ge 3 ] && set -x - HEADER="To: <$RCPTTO>\n"; + HEADER="To: <$RCPTTO>\n" if [ "$MAILFROM" ]; then HEADER+="From: $MAILFROM\n" fi -- echo -e "${HEADER}Subject: freenom.sh: \"$1\" on \"$HOSTNAME\"\n\nDate: $( date +%F\ %T )\n\n$2" | "$MTA" "$RCPTTO" +- echo -e "${HEADER}Subject: freenom.sh: \"$1\" on \"$HOSTNAME\"\n\nDate: $(date +%F\ %T)\n\n$2" | "$MTA" "$RCPTTO" + echo -e "${HEADER}Subject: freenom.sh: \"$1\" on \"$HOSTNAME\"\n\nDate: $( date +%F\ %T )\n\n$2" | func_mailto "$RCPTTO" EXITCODE="$?" if [ "$EXITCODE" -ne 0 ]; then @@ -177,5 +176,5 @@ index 01ed3fe..5ec1ea3 100755 [ "$debug" -ge 3 ] && set +x fi -- -2.33.0.windows.2 +2.39.2 @@ -1,8 +1,8 @@ # Maintainer: atom.long <atom.long@hotmail.com> pkgname=freenom-script -pkgver=20210824 -pkgrel=4 +pkgver=20230226 +pkgrel=1 pkgdesc="Freenom.com Domain Renewal and Dynamic DNS script." arch=('any') url="https://github.com/mkorthof/freenom-script" @@ -13,8 +13,8 @@ source=("${pkgname}::git+${url}.git" 0001-Makefile-Support-staged-installs-with-DESTDIR.patch 0002-send-mail-via-curl-command.patch) md5sums=('SKIP' - '1747aec87824ab195db8a39803fc8d49' - 'be0f303a84acd3b6a8a5388bc17e3813') + '1bcaf7df11f92cdcb4f39499e3ec824a' + 'cb5b77eba766c5a36ede21abba6db514') install=freenom-script.install pkgver() { |