From 72208868537f527f0e085e5a9f32a73779d9076c Mon Sep 17 00:00:00 2001 From: Beeranco <49772805+Beeranco@users.noreply.github.com> Date: Mon, 14 Aug 2023 01:36:41 +0200 Subject: [PATCH] Update Updater.sh Removed #Test Variables Set check if file older then to the correct values: Domoticz every 6 months Node-RED every 3 months Zigbee2MQTT every 1 month OS updates every 2 weeks --- Updater.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/Updater.sh b/Updater.sh index f0e10fc..69841e2 100644 --- a/Updater.sh +++ b/Updater.sh @@ -1,14 +1,5 @@ #!/bin/bash -##-------------## -# Reminders # -##-------------## - -#Updating Domoticz every 6 monts -#Node-RED has a cycle of about every 3 months -#Zigbee2MQTT about every month -#OS updates every 2 weeks - ##---------------## # Static Vars # ##---------------## @@ -51,27 +42,27 @@ fi ##-------------## if grep -q Domoticz "/etc/installedmodules"; then - if [[ ! $(find "$DomoChk" -newermt "1 hours ago") ]]; then + if [[ ! $(find "$DomoChk" -newermt "4368 hours ago") ]]; then DomoUpd=true else DomoUpd=false fi fi if grep -q Node-RED "/etc/installedmodules"; then - if [[ ! $(find "$NodeChk" -newermt "1 hours ago") ]]; then + if [[ ! $(find "$NodeChk" -newermt "2184 hours ago") ]]; then NodeUpd=true else NodeUpd=false fi fi if grep -q Zigbee2MQTT "/etc/installedmodules"; then - if [[ ! $(find "$ZB2mChk" -newermt "1 hours ago") ]]; then + if [[ ! $(find "$ZB2mChk" -newermt "720 hours ago") ]]; then ZB2mUpd=true else ZB2mUpd=false fi fi -if [[ ! $(find "$osChk" -newermt "1 hours ago") ]]; then +if [[ ! $(find "$osChk" -newermt "336 hours ago") ]]; then osUpd=true else osUpd=false @@ -89,13 +80,6 @@ echo "" # Updater # ##-----------## -#echo "Test variables for updater" -#DomoUpd=false -#NodeUpd=false -#ZB2mUpd=false -#osUpd=false -#echo "" - if [[ $DomoUpd == false ]] && [[ $NodeUpd == false ]] && [[ $ZB2mUpd == false ]] && [[ $osUpd == false ]]; then whiptail --title "Updater" --msgbox "All packages have been updated recently enough, you're up-to-date! \nThank you $NAME for checking anyway :)" 8 78 exit