From 6e547999735603a2f68f29692858054616ea07ed Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Fri, 20 Mar 2026 18:59:14 -0300 Subject: [PATCH] fix: Kill botserver before scp deploy to prevent file lock --- .forgejo/workflows/botserver.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index d01d34ab..86d4f3c5 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -66,6 +66,6 @@ jobs: - name: Deploy via SSH working-directory: workspace run: | - ssh -o StrictHostKeyChecking=no pragmatismo-system "systemctl stop system.service || true" + ssh -o StrictHostKeyChecking=no pragmatismo-system "pkill -f /opt/gbo/bin/botserver || true; sleep 2" scp -o StrictHostKeyChecking=no target/debug/botserver pragmatismo-system:/opt/gbo/bin/botserver - ssh -o StrictHostKeyChecking=no pragmatismo-system "chmod +x /opt/gbo/bin/botserver && systemctl start system.service" + ssh -o StrictHostKeyChecking=no pragmatismo-system "chmod +x /opt/gbo/bin/botserver && cd /opt/gbo/bin && nohup sudo -u gbuser ./botserver --noconsole >> /opt/gbo/logs/error.log 2>&1 &"