Files
ladill-hosting/deploy/bin/ladill-hosting-user
isaaccladandCursor e251a4cf60
Deploy Ladill Hosting / deploy (push) Failing after 17s
Initial Ladill Hosting app with Gitea deploy pipeline.
Shared web hosting extracted from the platform monolith, with CI deploy
to /var/www/ladill-hosting matching Bird/Domains/Email.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 16:24:20 +00:00

22 lines
410 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Usage: ladill-hosting-user <username> <base64-command>" >&2
exit 64
}
[[ $# -eq 2 ]] || usage
username="$1"
payload_b64="$2"
if [[ ! "$username" =~ ^[A-Za-z_][A-Za-z0-9_-]*$ ]]; then
echo "Invalid username: $username" >&2
exit 64
fi
command="$(printf '%s' "$payload_b64" | base64 --decode)"
exec runuser -u "$username" -- bash -lc "$command"