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