From 7a16c68f9492700dbf3f24c6d03e4b7242639ba1 Mon Sep 17 00:00:00 2001 From: Beeranco <49772805+Beeranco@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:32:52 +0200 Subject: [PATCH] Update monitor.service Added available and listening ports --- RasPi-Config/monitor.service | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/RasPi-Config/monitor.service b/RasPi-Config/monitor.service index ccd2a47..a031365 100644 --- a/RasPi-Config/monitor.service +++ b/RasPi-Config/monitor.service @@ -26,8 +26,8 @@ KERNEL=`uname -r` ##------------## 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 domoticz.service && Domo=Online || DomoStat=Offline +systemctl is-active --quiet nodered.service && Node=Online || NodeStat=Offline systemctl is-active --quiet zigbee2mqtt.service && ZB2M=Online || ZB2M=Offline systemctl is-active --quiet mosquitto.service && MQTT=Online || MQTT=Offline @@ -45,20 +45,18 @@ 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 +if [[ $Domo == Online ]]; then echo -e "Domoticz is: ${GREEN}online${RESET}" else echo -e "Domoticz is: ${RED}offline${RESET}" fi -if [[ $NodeStat == Online ]]; then +if [[ $Node == Online ]]; then echo -e "Node-RED is: ${GREEN}online${RESET}" else echo -e "Node-RED is: ${RED}offline${RESET}" @@ -74,6 +72,21 @@ if [[ $MQTT == Online ]]; then echo -e "MQTT broker is: ${RED}offline${RESET}" fi +echo "" +echo "Available ports:" +if [[ $DomoStat == Online ]]; then + echo "Domoticz is available on port: 8080" +fi +if [[ $NodeStat == Online ]]; then + echo "Node-RED is available on port: 1880" +fi +if [[ $ZB2M == Online ]]; then + echo "Zigbee2MQTT is available on port: 5002" +fi +if [[ $MQTT == Online ]]; then + echo "MQTT broker is listening on port: 1883" +fi + #Set CPU and RAM stat here cause it takes a sec to load #If placed under Static Vars the screen reloads slower CPUstat=`(top -bn1 | awk '/Cpu/ { print $2"%"}')`