7d5f0920b7
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.
10 lines
230 B
Bash
Executable File
10 lines
230 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
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
|