added deploy watch, pull script. minor refactors

This commit is contained in:
Hunter
2026-10-03 14:31:43 -04:00
parent 6dbaa647dc
commit 30c8ad9293
30 changed files with 370 additions and 213 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Stops and removes the deploy-watch systemd service installed by
# install-deploy-watch.sh.
#
# Usage: sudo ./scripts/uninstall-deploy-watch.sh
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
echo "Run this with sudo (modifies /etc/systemd/system)." >&2
exit 1
fi
UNIT_NAME="deploy-watch-hwilliams-dev.service"
UNIT_DEST="/etc/systemd/system/$UNIT_NAME"
if systemctl list-unit-files | grep -q "^$UNIT_NAME"; then
systemctl disable --now "$UNIT_NAME"
else
echo "$UNIT_NAME is not installed; nothing to disable."
fi
if [ -f "$UNIT_DEST" ]; then
rm "$UNIT_DEST"
systemctl daemon-reload
echo "Removed $UNIT_DEST."
else
echo "$UNIT_DEST not found; nothing to remove."
fi