summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deploy17
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/deploy b/scripts/deploy
index fbe6f9e..863dfe8 100755
--- a/scripts/deploy
+++ b/scripts/deploy
@@ -39,24 +39,19 @@ export GOCACHE="${SITE_DIR}/cache/go-build"
export GOPATH="${SITE_DIR}/cache/gopath"
mkdir -p "${GOCACHE}" "${GOPATH}"
go build -o "${BIN_DIR}/claudomator" ./cmd/claudomator/
-chown www-data:www-data "${BIN_DIR}/claudomator"
-chmod +x "${BIN_DIR}/claudomator"
-
-if [ -f "${BIN_DIR}/claude" ]; then
- echo "==> Fixing Claude permissions..."
- chown www-data:www-data "${BIN_DIR}/claude"
- chmod +x "${BIN_DIR}/claude"
-fi
echo "==> Copying scripts..."
mkdir -p "${SITE_DIR}/scripts"
find "${REPO_DIR}/scripts" -maxdepth 1 -type f -exec cp -p {} "${SITE_DIR}/scripts/" \;
-chown -R www-data:www-data "${SITE_DIR}/scripts"
-find "${SITE_DIR}/scripts" -maxdepth 1 -type f -exec chmod +x {} +
echo "==> Installing to /usr/local/bin..."
cp "${BIN_DIR}/claudomator" /usr/local/bin/claudomator
-chmod +x /usr/local/bin/claudomator
+
+echo "==> Fixing permissions..."
+"${REPO_DIR}/scripts/fix-permissions"
+
+echo "==> Syncing credentials..."
+"${REPO_DIR}/scripts/sync-credentials"
echo "==> Restarting service..."
sudo systemctl restart "${SERVICE}"