From 88fb727bc755c76cd155cf82f4e31d605809be6d Mon Sep 17 00:00:00 2001 From: Beeranco <49772805+Beeranco@users.noreply.github.com> Date: Mon, 14 Aug 2023 16:00:03 +0200 Subject: [PATCH] Update monitor.service Added Log2Ram to the monitor service Reduced refresh rate to 15sec for testing purposes --- RasPi-Config/monitor.service | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/RasPi-Config/monitor.service b/RasPi-Config/monitor.service index 838875d..ccd2a47 100644 --- a/RasPi-Config/monitor.service +++ b/RasPi-Config/monitor.service @@ -25,6 +25,7 @@ KERNEL=`uname -r` # 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 nodered.service && NodeStat=Online || NodeStat=Offline systemctl is-active --quiet zigbee2mqtt.service && ZB2M=Online || ZB2M=Offline @@ -44,7 +45,14 @@ echo "RAM usage: $MEMstat" echo "Kernel $KERNEL" echo "" + 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 echo -e "Domoticz is: ${GREEN}online${RESET}" else @@ -76,5 +84,5 @@ MEMstat=`(free -m | awk '/Mem/{print $3"MB"}')` # Restart loop # ##----------------## -sleep 30 +sleep 15 done