replace per-app deploy scripts with generic deploy.sh

Dispatch now validates the command format and routes to a single
deploy.sh that handles any app. This fixes first-deploy failures
for new apps (dispatch no longer needs a static case list) and
simplifies new-app.sh (no deploy script or dispatch update needed).

Also adds input validation to new-app.sh, set -euo pipefail to
deploy scripts, and dnf module reset before nodejs install.
This commit is contained in:
2026-03-13 17:00:59 -04:00
parent 587b671e61
commit 7d5f0920b7
7 changed files with 35 additions and 41 deletions
+6 -9
View File
@@ -1,12 +1,9 @@
#!/bin/bash
set -euo pipefail
case "$SSH_ORIGINAL_COMMAND" in
deploy-nginx) sudo /opt/hantim/scripts/deploy-nginx.sh ;;
deploy-timothykim) sudo /opt/hantim/scripts/deploy-timothykim.sh ;;
*)
echo "Unknown command: $SSH_ORIGINAL_COMMAND"
echo "Available: deploy-nginx, deploy-timothykim"
exit 1
;;
esac
if [[ "$SSH_ORIGINAL_COMMAND" =~ ^deploy-[a-zA-Z0-9._-]+$ ]]; then
sudo /opt/hantim/scripts/deploy.sh "$SSH_ORIGINAL_COMMAND"
else
echo "Unknown command: $SSH_ORIGINAL_COMMAND"
exit 1
fi