From 2bbae7416274ef83a6b1d0f9e6101814f0d15ad1 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 5 Mar 2026 17:42:02 +0000 Subject: scripts: add debug-execution and deploy debug-execution: inspect a failed execution by ID prefix from prod DB. deploy: build and restart the claudomator systemd service. Co-Authored-By: Claude Sonnet 4.6 --- scripts/deploy | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/deploy (limited to 'scripts/deploy') diff --git a/scripts/deploy b/scripts/deploy new file mode 100755 index 0000000..a17b1ab --- /dev/null +++ b/scripts/deploy @@ -0,0 +1,26 @@ +#!/bin/bash +# deploy — Build and deploy claudomator to /site/doot.terst.org +# Usage: ./scripts/deploy +# Example: sudo ./scripts/deploy + +set -euo pipefail + +FQDN="doot.terst.org" +SITE_DIR="/site/${FQDN}" +BIN_DIR="${SITE_DIR}/bin" +SERVICE="claudomator@${FQDN}" +REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)" + +echo "==> Building claudomator..." +cd "${REPO_DIR}" +go build -o "${BIN_DIR}/claudomator" ./cmd/claudomator/ + +echo "==> Fixing permissions..." +chown www-data:www-data "${BIN_DIR}/claudomator" +chmod +x "${BIN_DIR}/claudomator" + +echo "==> Restarting service..." +systemctl restart "${SERVICE}" +systemctl status "${SERVICE}" --no-pager -l + +echo "==> Done!" -- cgit v1.2.3