Update monitor.service

Added Log2Ram to the monitor service
Reduced refresh rate to 15sec for testing purposes
This commit is contained in:
Beeranco 2023-08-14 16:00:03 +02:00 committed by GitHub
parent 1a587bbf4e
commit 88fb727bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ KERNEL=`uname -r`
# Services # # Services #
##------------## ##------------##
systemctl is-active --quiet log2ram.service && L2R=Online || L2R=Offline
systemctl is-active --quiet domoticz.service && DomoStat=Online || DomoStat=Offline systemctl is-active --quiet domoticz.service && DomoStat=Online || DomoStat=Offline
systemctl is-active --quiet nodered.service && NodeStat=Online || NodeStat=Offline systemctl is-active --quiet nodered.service && NodeStat=Online || NodeStat=Offline
systemctl is-active --quiet zigbee2mqtt.service && ZB2M=Online || ZB2M=Offline systemctl is-active --quiet zigbee2mqtt.service && ZB2M=Online || ZB2M=Offline
@ -44,7 +45,14 @@ echo "RAM usage: $MEMstat"
echo "Kernel $KERNEL" echo "Kernel $KERNEL"
echo "" echo ""
echo "Services:" echo "Services:"
if [[ $L2R == Online ]]; then
echo -e "Log2Ram is: ${GREEN}online${RESET}"
else
echo -e "Log2Ram is: ${RED}offline${RESET}"
fi
if [[ $DomoStat == Online ]]; then if [[ $DomoStat == Online ]]; then
echo -e "Domoticz is: ${GREEN}online${RESET}" echo -e "Domoticz is: ${GREEN}online${RESET}"
else else
@ -76,5 +84,5 @@ MEMstat=`(free -m | awk '/Mem/{print $3"MB"}')`
# Restart loop # # Restart loop #
##----------------## ##----------------##
sleep 30 sleep 15
done done