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
This commit is contained in:
parent
cc0dcfb5ba
commit
7220886853
24
Updater.sh
24
Updater.sh
@ -1,14 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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 #
|
# Static Vars #
|
||||||
##---------------##
|
##---------------##
|
||||||
@ -51,27 +42,27 @@ fi
|
|||||||
##-------------##
|
##-------------##
|
||||||
|
|
||||||
if grep -q Domoticz "/etc/installedmodules"; then
|
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
|
DomoUpd=true
|
||||||
else
|
else
|
||||||
DomoUpd=false
|
DomoUpd=false
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if grep -q Node-RED "/etc/installedmodules"; then
|
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
|
NodeUpd=true
|
||||||
else
|
else
|
||||||
NodeUpd=false
|
NodeUpd=false
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if grep -q Zigbee2MQTT "/etc/installedmodules"; then
|
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
|
ZB2mUpd=true
|
||||||
else
|
else
|
||||||
ZB2mUpd=false
|
ZB2mUpd=false
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ ! $(find "$osChk" -newermt "1 hours ago") ]]; then
|
if [[ ! $(find "$osChk" -newermt "336 hours ago") ]]; then
|
||||||
osUpd=true
|
osUpd=true
|
||||||
else
|
else
|
||||||
osUpd=false
|
osUpd=false
|
||||||
@ -89,13 +80,6 @@ echo ""
|
|||||||
# Updater #
|
# 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
|
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
|
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
|
exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user