From 0e8d385fdb05ab8b52e5cee2187f9289e77a9a02 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:02:52 +0200 Subject: [PATCH 01/15] installer: update ntp to ntp+ntpstat --- node-installer.sh | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 3a77a3bb..35618b75 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2731,35 +2731,30 @@ SystemMaintenance() { echo "╚═════════════════════════════════════════════════════════════════════════════╝" echo "" - if [ -f /etc/systemd/timesyncd.conf ]; then - - if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - sudo ufw allow ntp >/dev/null - fi - - VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^#NTP= | cut -d '=' -f 2)" - if [ -z "$VAR_NTP" ]; then - sed -i 's/^#NTP=.*/NTP=/g' /etc/systemd/timesyncd.conf - fi + if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then + sudo ufw allow ntp >/dev/null + fi - VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^NTP= | cut -d '=' -f 2)" - if [ -z "$VAR_NTP" ]; then - sed -i 's/^NTP=.*/NTP=pool.ntp.org/g' /etc/systemd/timesyncd.conf - fi + sudo systemctl start ntp >/dev/null + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" + if [ -z "$VAR_NTP" ]; then + echo "$or""ntp service not running""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + fi - sudo timedatectl set-ntp true >/dev/null - sudo systemctl restart systemd-timesyncd.service >/dev/null + sudo systemctl enable ntp >/dev/null + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" + if [ -z "$VAR_NTP" ]; then + echo "$or""ntp not enabled""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + fi - if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 timedatectl status | grep 'System clock synchronized: yes')" ]; then - echo "$gn""time synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$or""time not synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - fi + if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct')" ]; then + echo "$gn""time synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi else - echo "$rd""Error time synchronization!""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronization failed"; NotifyMessage "err!" "$VAR_DOMAIN" "$VAR_STATUS"; fi + echo "$or""time not synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear @@ -5137,7 +5132,7 @@ echo "> $gn""$InstallerHash""$xx" echo " $gr""$(cat /etc/issue | cut -d ' ' -f 1)"" | m=\"$opt_mode\" | t=\"$opt_time\" | r=\"$opt_reboot\" | c=\"$opt_check\" | l=\"$opt_level\"""$xx" DEBIAN_FRONTEND=noninteractive sudo apt update >/dev/null 2>&1 -DEBIAN_FRONTEND=noninteractive sudo apt install openssl systemd-timesyncd qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 +DEBIAN_FRONTEND=noninteractive sudo apt install openssl ntp ntpstat qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 sleep 1 From e1f95365dbc087a4f3e4f9faac48853eb1de9161 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:08:42 +0200 Subject: [PATCH 02/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 35618b75..c212e5df 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2736,14 +2736,14 @@ SystemMaintenance() { fi sudo systemctl start ntp >/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status 2>/dev/null | grep running >/dev/null)" if [ -z "$VAR_NTP" ]; then echo "$or""ntp service not running""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi sudo systemctl enable ntp >/dev/null - VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled' >/dev/null)" if [ -z "$VAR_NTP" ]; then echo "$or""ntp not enabled""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi From 4b2116cb96978e01cb717df8ece4f19ec266cbb4 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:11:31 +0200 Subject: [PATCH 03/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index c212e5df..c6dbdc74 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2736,20 +2736,20 @@ SystemMaintenance() { fi sudo systemctl start ntp >/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status 2>/dev/null | grep running >/dev/null)" + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running) 2>/dev/null" if [ -z "$VAR_NTP" ]; then echo "$or""ntp service not running""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi sudo systemctl enable ntp >/dev/null - VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled' >/dev/null)" + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled') 2>/dev/null" if [ -z "$VAR_NTP" ]; then echo "$or""ntp not enabled""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi - if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct')" ]; then + if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct') 2>/dev/null" ]; then echo "$gn""time synchronized""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi else From 577edb146dabf4eb97977d40a02759e98426a987 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:20:36 +0200 Subject: [PATCH 04/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index c6dbdc74..817a1116 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2732,29 +2732,33 @@ SystemMaintenance() { echo "" if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - sudo ufw allow ntp >/dev/null + fi sudo systemctl start ntp >/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running) 2>/dev/null" + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""ntp service not running""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$gn""ntp service running""$xx" fi - sudo systemctl enable ntp >/dev/null - VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled') 2>/dev/null" + sudo systemctl enable ntp 2>/dev/null + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""ntp not enabled""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$gn""ntp enabled""$xx" fi - if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct') 2>/dev/null" ]; then - echo "$gn""time synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else + if [ -z "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct') 2>/dev/null" ]; then echo "$or""time not synchronized""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$gn""time synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear From 1f43a3f73ebe01ea0a0b643e2061cdc7255ceb71 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:26:09 +0200 Subject: [PATCH 05/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 817a1116..eb27c668 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2732,10 +2732,10 @@ SystemMaintenance() { echo "" if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - + sudo ufw allow ntp >/dev/null fi - sudo systemctl start ntp >/dev/null + sudo systemctl start ntp 2>/dev/null VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""ntp service not running""$xx" From 4ac689ecf2c5140c24fed02805d07ae56b9bdbf3 Mon Sep 17 00:00:00 2001 From: "dlt.green" <89119285+dlt-green@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:34:50 +0200 Subject: [PATCH 06/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node-installer.sh b/node-installer.sh index eb27c668..a821bc68 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2753,7 +2753,9 @@ SystemMaintenance() { echo "$gn""ntp enabled""$xx" fi - if [ -z "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct') 2>/dev/null" ]; then + sudo systemctl restart ntp.service 2>/dev/null + + if [ -z "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct')" ]; then echo "$or""time not synchronized""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi else From 96209cd91032944c0668ac52ea3b62b2e29c5a8f Mon Sep 17 00:00:00 2001 From: "dlt.green" <89119285+dlt-green@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:42:38 +0200 Subject: [PATCH 07/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index a821bc68..6a756489 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2736,7 +2736,7 @@ SystemMaintenance() { fi sudo systemctl start ntp 2>/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""ntp service not running""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi @@ -2745,6 +2745,7 @@ SystemMaintenance() { fi sudo systemctl enable ntp 2>/dev/null + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""ntp not enabled""$xx" @@ -2754,9 +2755,11 @@ SystemMaintenance() { fi sudo systemctl restart ntp.service 2>/dev/null - - if [ -z "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat | grep 'time correct')" ]; then - echo "$or""time not synchronized""$xx" + sleep 10 + + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat status | grep 'time correct')" 2>/dev/null + if [ -z "$VAR_NTP" ]; then + echo "$or""time not synchronized""$xx" if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi else echo "$gn""time synchronized""$xx" From 13e8ce12c63de46b4ffe81f2b618eda52272929c Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Mon, 1 Jul 2024 17:22:12 +0200 Subject: [PATCH 08/15] +installer: update ntp to ntp+ntpstat --- node-installer.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 6a756489..17da2533 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2754,9 +2754,6 @@ SystemMaintenance() { echo "$gn""ntp enabled""$xx" fi - sudo systemctl restart ntp.service 2>/dev/null - sleep 10 - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat status | grep 'time correct')" 2>/dev/null if [ -z "$VAR_NTP" ]; then echo "$or""time not synchronized""$xx" From fd1050b9272e4fab15542f068b747f2465681b97 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Thu, 20 Jun 2024 22:02:52 +0200 Subject: [PATCH 09/15] installer: update ntp to ntp+ntpstat --- node-installer.sh | 53 ++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 3a77a3bb..17da2533 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2731,35 +2731,36 @@ SystemMaintenance() { echo "╚═════════════════════════════════════════════════════════════════════════════╝" echo "" - if [ -f /etc/systemd/timesyncd.conf ]; then - - if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - sudo ufw allow ntp >/dev/null - fi - - VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^#NTP= | cut -d '=' -f 2)" - if [ -z "$VAR_NTP" ]; then - sed -i 's/^#NTP=.*/NTP=/g' /etc/systemd/timesyncd.conf - fi + if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then + sudo ufw allow ntp >/dev/null + fi - VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^NTP= | cut -d '=' -f 2)" - if [ -z "$VAR_NTP" ]; then - sed -i 's/^NTP=.*/NTP=pool.ntp.org/g' /etc/systemd/timesyncd.conf - fi + sudo systemctl start ntp 2>/dev/null + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null + if [ -z "$VAR_NTP" ]; then + echo "$or""ntp service not running""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$gn""ntp service running""$xx" + fi - sudo timedatectl set-ntp true >/dev/null - sudo systemctl restart systemd-timesyncd.service >/dev/null + sudo systemctl enable ntp 2>/dev/null + + VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" 2>/dev/null + if [ -z "$VAR_NTP" ]; then + echo "$or""ntp not enabled""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$gn""ntp enabled""$xx" + fi - if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 timedatectl status | grep 'System clock synchronized: yes')" ]; then - echo "$gn""time synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$or""time not synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - fi + VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat status | grep 'time correct')" 2>/dev/null + if [ -z "$VAR_NTP" ]; then + echo "$or""time not synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi else - echo "$rd""Error time synchronization!""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronization failed"; NotifyMessage "err!" "$VAR_DOMAIN" "$VAR_STATUS"; fi + echo "$gn""time synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear @@ -5137,7 +5138,7 @@ echo "> $gn""$InstallerHash""$xx" echo " $gr""$(cat /etc/issue | cut -d ' ' -f 1)"" | m=\"$opt_mode\" | t=\"$opt_time\" | r=\"$opt_reboot\" | c=\"$opt_check\" | l=\"$opt_level\"""$xx" DEBIAN_FRONTEND=noninteractive sudo apt update >/dev/null 2>&1 -DEBIAN_FRONTEND=noninteractive sudo apt install openssl systemd-timesyncd qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 +DEBIAN_FRONTEND=noninteractive sudo apt install openssl ntp ntpstat qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 sleep 1 From 4e61b305fc0e5b74b940349a1f69b49cfda63556 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Mon, 1 Jul 2024 17:24:04 +0200 Subject: [PATCH 10/15] Revert "installer: update ntp to ntp+ntpstat" This reverts commit fd1050b9272e4fab15542f068b747f2465681b97. --- node-installer.sh | 53 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 17da2533..3a77a3bb 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2731,36 +2731,35 @@ SystemMaintenance() { echo "╚═════════════════════════════════════════════════════════════════════════════╝" echo "" - if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - sudo ufw allow ntp >/dev/null - fi + if [ -f /etc/systemd/timesyncd.conf ]; then - sudo systemctl start ntp 2>/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""ntp service not running""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$gn""ntp service running""$xx" - fi + if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then + sudo ufw allow ntp >/dev/null + fi - sudo systemctl enable ntp 2>/dev/null - - VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""ntp not enabled""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$gn""ntp enabled""$xx" - fi + VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^#NTP= | cut -d '=' -f 2)" + if [ -z "$VAR_NTP" ]; then + sed -i 's/^#NTP=.*/NTP=/g' /etc/systemd/timesyncd.conf + fi + + VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^NTP= | cut -d '=' -f 2)" + if [ -z "$VAR_NTP" ]; then + sed -i 's/^NTP=.*/NTP=pool.ntp.org/g' /etc/systemd/timesyncd.conf + fi - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat status | grep 'time correct')" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""time not synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + sudo timedatectl set-ntp true >/dev/null + sudo systemctl restart systemd-timesyncd.service >/dev/null + + if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 timedatectl status | grep 'System clock synchronized: yes')" ]; then + echo "$gn""time synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$or""time not synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + fi else - echo "$gn""time synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi + echo "$rd""Error time synchronization!""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronization failed"; NotifyMessage "err!" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear @@ -5138,7 +5137,7 @@ echo "> $gn""$InstallerHash""$xx" echo " $gr""$(cat /etc/issue | cut -d ' ' -f 1)"" | m=\"$opt_mode\" | t=\"$opt_time\" | r=\"$opt_reboot\" | c=\"$opt_check\" | l=\"$opt_level\"""$xx" DEBIAN_FRONTEND=noninteractive sudo apt update >/dev/null 2>&1 -DEBIAN_FRONTEND=noninteractive sudo apt install openssl ntp ntpstat qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 +DEBIAN_FRONTEND=noninteractive sudo apt install openssl systemd-timesyncd qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 sleep 1 From 8ff3fc717277d1f664a3c2ad9a11b3f6eca9c6c7 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Mon, 1 Jul 2024 17:27:31 +0200 Subject: [PATCH 11/15] iota-wasp: update v1.3.0 --- node-installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 17da2533..64b9a811 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -25,11 +25,11 @@ VAR_IOTA_INX_DASHBOARD_VERSION='1.0' # IOTA-WASP -VAR_IOTA_WASP_VERSION='1.1.0' +VAR_IOTA_WASP_VERSION='1.3.0' VAR_IOTA_WASP_UPDATE=1 VAR_IOTA_WASP_DASHBOARD_VERSION='0.1.9' -VAR_IOTA_WASP_CLI_VERSION='1.1.0' +VAR_IOTA_WASP_CLI_VERSION='1.3.0' VAR_IOTA_EVM_ADDR='iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5' From 140e9ae0c77a703425a315c245c3d136a22d4018 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jul 2024 15:41:19 +0000 Subject: [PATCH 12/15] Set version to v.4.5.8 --- node-installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-installer.sh b/node-installer.sh index 64b9a811..011fd423 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -1,6 +1,6 @@ #!/bin/sh -VRSN="v.4.5.7" +VRSN="v.4.5.8" BUILD="20240618_225742" VAR_DOMAIN='' From 6753961ad57d1f8fb5543fed11c73539663ae018 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jul 2024 15:41:39 +0000 Subject: [PATCH 13/15] Update release artifacts [v.4.5.8] [skip actions] --- node-installer.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 011fd423..c7bce531 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -1,7 +1,7 @@ #!/bin/sh VRSN="v.4.5.8" -BUILD="20240618_225742" +BUILD="20240701_174135" VAR_DOMAIN='' VAR_HOST='' @@ -147,19 +147,19 @@ DEBIAN_FRONTEND=noninteractive sudo apt-get install curl -y -qq >/dev/null 2>&1 InstallerHash=$(curl -L https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/checksum.txt) >/dev/null 2>&1 -IotaHornetHash='7865d182d19385a404046aad4e532a9566781c776e97a3b0d1b2d3f55e09f379' +IotaHornetHash='c2581e7abea4905695d5490671ada3979b39737c88db9e375326f55c809da18f' IotaHornetPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/iota-hornet.tar.gz" -IotaWaspHash='40d373f5d7a76afc9b120b64266725e99e4929cce0c76434ef764149dfd2ea60' +IotaWaspHash='5d873383ba6f39b31838c1f80fbbfeb1c736b946a5dc2556dd5e82c4be687e82' IotaWaspPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/iota-wasp.tar.gz" -ShimmerHornetHash='ba8dc7945707d26a43881383157a89e0d7d0e1a114bde2701ac8efc11bbe3c3e' +ShimmerHornetHash='bbd6c1e77d01ca98ceb667304aff82b61122629fe997906637d288bfb8105b7c' ShimmerHornetPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-hornet.tar.gz" -ShimmerWaspHash='e63a890e65f2b129d83291f260903354df430ac98950eb2ba9ff550758fb8a0b' +ShimmerWaspHash='fa1c60d79e72a16af047ec3ae82390b18802a9b540c27882703bdf40579eb3f7' ShimmerWaspPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-wasp.tar.gz" -ShimmerChronicleHash='091c12aa9434eb43e3de7743d56dafa0c81b292f2d394e05584b2abc466aa143' +ShimmerChronicleHash='8a8002bdf1632f302b352764e934391e6d71f7f186276a123a8a14cdef9eee6b' ShimmerChroniclePackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-chronicle.tar.gz" if [ "$VRSN" = 'dev-latest' ]; then VRSN=$BUILD; fi From b6d0caa7958628c7dcbbd47377b0e34c83dbc930 Mon Sep 17 00:00:00 2001 From: "dlt.green" Date: Mon, 1 Jul 2024 17:47:15 +0200 Subject: [PATCH 14/15] revert changes ntp --- node-installer.sh | 55 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index c7bce531..1040e6af 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -2731,39 +2731,38 @@ SystemMaintenance() { echo "╚═════════════════════════════════════════════════════════════════════════════╝" echo "" - if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then - sudo ufw allow ntp >/dev/null - fi + if [ -f /etc/systemd/timesyncd.conf ]; then - sudo systemctl start ntp 2>/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 service ntp status | grep running)" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""ntp service not running""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: ntp service not running"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$gn""ntp service running""$xx" - fi + if [ "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ufw status | grep 'Status:' | cut -d ' ' -f 2)" = 'active' ]; then + sudo ufw allow ntp >/dev/null + fi - sudo systemctl enable ntp 2>/dev/null - - VAR_NTP="$(sudo service ntp status | grep 'ntp.service; enabled')" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""ntp not enabled""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: ntp not enabled"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi - else - echo "$gn""ntp enabled""$xx" - fi + VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^#NTP= | cut -d '=' -f 2)" + if [ -z "$VAR_NTP" ]; then + sed -i 's/^#NTP=.*/NTP=/g' /etc/systemd/timesyncd.conf + fi + + VAR_NTP="$(cat /etc/systemd/timesyncd.conf 2>/dev/null | grep ^NTP= | cut -d '=' -f 2)" + if [ -z "$VAR_NTP" ]; then + sed -i 's/^NTP=.*/NTP=pool.ntp.org/g' /etc/systemd/timesyncd.conf + fi + + sudo timedatectl set-ntp true >/dev/null + sudo systemctl restart systemd-timesyncd.service >/dev/null - VAR_NTP="$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 ntpstat status | grep 'time correct')" 2>/dev/null - if [ -z "$VAR_NTP" ]; then - echo "$or""time not synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + if [ -n "$(LC_ALL=en_GB.UTF-8 LC_LANG=en_GB.UTF-8 timedatectl status | grep 'System clock synchronized: yes')" ]; then + echo "$gn""time synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi + else + echo "$or""time not synchronized""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time not synchronized"; NotifyMessage "warn" "$VAR_DOMAIN" "$VAR_STATUS"; fi + fi else - echo "$gn""time synchronized""$xx" - if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronized"; NotifyMessage "info" "$VAR_DOMAIN" "$VAR_STATUS"; fi + echo "$rd""Error time synchronization!""$xx" + if [ "$opt_mode" ]; then VAR_STATUS="system: time synchronization failed"; NotifyMessage "err!" "$VAR_DOMAIN" "$VAR_STATUS"; fi fi - echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear + echo "$fl"; PromptMessage "$opt_time" "Press [Enter] / wait ["$opt_time"s] to continue... Press [P] to pause / [C] to cancel"; echo "$xx" clear echo "" @@ -5138,7 +5137,7 @@ echo "> $gn""$InstallerHash""$xx" echo " $gr""$(cat /etc/issue | cut -d ' ' -f 1)"" | m=\"$opt_mode\" | t=\"$opt_time\" | r=\"$opt_reboot\" | c=\"$opt_check\" | l=\"$opt_level\"""$xx" DEBIAN_FRONTEND=noninteractive sudo apt update >/dev/null 2>&1 -DEBIAN_FRONTEND=noninteractive sudo apt install openssl ntp ntpstat qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 +DEBIAN_FRONTEND=noninteractive sudo apt install openssl systemd-timesyncd qrencode nano curl jq expect dnsutils ufw bc -y -qq >/dev/null 2>&1 sleep 1 From 0924a2179f7c812a1c6d229f4d22faf9be6eea83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jul 2024 15:48:00 +0000 Subject: [PATCH 15/15] Update release artifacts [v.4.5.8] [skip actions] --- node-installer.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node-installer.sh b/node-installer.sh index 1040e6af..da13292e 100644 --- a/node-installer.sh +++ b/node-installer.sh @@ -1,7 +1,7 @@ #!/bin/sh VRSN="v.4.5.8" -BUILD="20240701_174135" +BUILD="20240701_174756" VAR_DOMAIN='' VAR_HOST='' @@ -147,19 +147,19 @@ DEBIAN_FRONTEND=noninteractive sudo apt-get install curl -y -qq >/dev/null 2>&1 InstallerHash=$(curl -L https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/checksum.txt) >/dev/null 2>&1 -IotaHornetHash='c2581e7abea4905695d5490671ada3979b39737c88db9e375326f55c809da18f' +IotaHornetHash='c05efc765eda028e67090fd3bde394bf85e74accf88f10e3a887571e2be452ee' IotaHornetPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/iota-hornet.tar.gz" -IotaWaspHash='5d873383ba6f39b31838c1f80fbbfeb1c736b946a5dc2556dd5e82c4be687e82' +IotaWaspHash='36ff4dbed0dff72097ea702d3e7e18f57fd91a7933a85eb299085e1602fa0ba4' IotaWaspPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/iota-wasp.tar.gz" -ShimmerHornetHash='bbd6c1e77d01ca98ceb667304aff82b61122629fe997906637d288bfb8105b7c' +ShimmerHornetHash='48a0cb8799a174be343cd49081ce3437ada5182a5735d1cc124a67b8d17b493a' ShimmerHornetPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-hornet.tar.gz" -ShimmerWaspHash='fa1c60d79e72a16af047ec3ae82390b18802a9b540c27882703bdf40579eb3f7' +ShimmerWaspHash='caaafb0cff9b42b252fb9b2f95ee0f821909d6175496cb45f0c177244ba326c1' ShimmerWaspPackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-wasp.tar.gz" -ShimmerChronicleHash='8a8002bdf1632f302b352764e934391e6d71f7f186276a123a8a14cdef9eee6b' +ShimmerChronicleHash='842738510d5f935890dc93da1b4aec312bcefd583b1b86b978da3a67aa4a5c8c' ShimmerChroniclePackage="https://github.com/dlt-green/node-installer-docker/releases/download/$VRSN/shimmer-chronicle.tar.gz" if [ "$VRSN" = 'dev-latest' ]; then VRSN=$BUILD; fi