From 90cde7632cbda2a265e393d9c5b026e37cf9e2c1 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 13:33:34 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 5a72a10d..22458725 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -80,8 +80,15 @@ CHECKTEMP_SERVICE(){ if [ ${action-x} ]; then case $action in checktemp) CHECKTEMP ${2};; - checktemp_service) CHECKTEMP_SERVICE ${2};; - + checktemp_service) + if [ "${2}" == "stop" ]; then + service_pid=`systemctl show --property MainPID --value serverroomth_sensor_monitor` + /bin/kill $service_pid + /bin/systemctl stop serverroomth_sensor_monitor + else + CHECKTEMP_SERVICE ${2} + fi + ;; esac fi