From 19c06639f5f9590ab13a3236a2fad484b53679ca Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 28 Nov 2025 10:27:47 +0100 Subject: [PATCH] Refactor rebuild_and_test.sh to improve service management: stop service before copying binaries and update status check sequence. --- rebuild_and_test.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rebuild_and_test.sh b/rebuild_and_test.sh index 1327287..9a2f201 100755 --- a/rebuild_and_test.sh +++ b/rebuild_and_test.sh @@ -10,17 +10,21 @@ if [ $? -ne 0 ]; then exit 1 fi -echo -e "\n=== 2. Binary nach /opt/ypchat/bin/ kopieren ===" +echo -e "\n=== 2. Service stoppen ===" +sudo systemctl stop ypchat.service +sleep 2 + +echo -e "\n=== 3. Binary nach /opt/ypchat/bin/ kopieren ===" sudo cp build/singlechat.wt /opt/ypchat/bin/singlechat.wt -echo -e "\n=== 3. Service neu starten ===" -sudo systemctl restart ypchat.service +echo -e "\n=== 4. Service starten ===" +sudo systemctl start ypchat.service sleep 3 -echo -e "\n=== 4. Service-Status prüfen ===" +echo -e "\n=== 5. Service-Status prüfen ===" sudo systemctl status ypchat.service --no-pager | grep -E "Active|since" | head -2 -echo -e "\n=== 5. robots Meta-Tag testen ===" +echo -e "\n=== 6. robots Meta-Tag testen ===" ./test_robots_tag.sh echo -e "\n=== Fertig! ==="