#!/bin/bash set -e python3 - <<'PYEOF' import re, pathlib p = pathlib.Path("/root/brennerstarts.py") s = p.read_text() s = re.sub(r"STEIGUNG_AN\s*=\s*[0-9.]+", "STEIGUNG_AN = 0.3", s, count=1) s = re.sub(r"STEIGUNG_1MIN\s*=\s*[0-9.]+", "STEIGUNG_1MIN = 0.1", s, count=1) s = re.sub(r"MIN_TEMP_BRENNER\s*=\s*[0-9.]+", "MIN_TEMP_BRENNER = 30", s, count=1) s = re.sub(r"STEIGUNG_AUS\s*=\s*-?[0-9.]+", "STEIGUNG_AUS = -0.15", s, count=1) p.write_text(s) print("patched") PYEOF echo "--- neue Schwellen ---" grep -n STEIGUNG_ /root/brennerstarts.py grep -n MIN_TEMP_ /root/brennerstarts.py grep -n BRENNER_RATE /root/brennerstarts.py echo "--- Timeouts ---" grep -n 'timeout=' /root/brennerstarts.py echo "--- service restart ---" systemctl restart brennerstarts sleep 3 systemctl is-active brennerstarts echo "--- log nach restart ---" tail -15 /var/log/brennerstarts.log