Guard target-owned deployment handlers

This commit is contained in:
Frank
2026-08-25 20:13:33 -07:00
parent a07b8c9306
commit 3a56a07883
2 changed files with 8 additions and 1 deletions
-1
View File
@@ -97,7 +97,6 @@ DANKSERVER_SERVICES = {
"sonarr",
"lidarr",
"readarr",
"homepage",
"frank-default-small",
}
+8
View File
@@ -193,6 +193,10 @@ render_caddyfile() {
}
deploy_homepage() {
if [[ "$TARGET" != dankclaw ]]; then
echo "homepage is owned by dankclaw; refusing to deploy it on $TARGET" >&2
return 2
fi
run_privileged mkdir -p /srv/homepage
run_privileged cp shared/homepage/index.html shared/homepage/admin.html shared/homepage/app.js \
shared/homepage/style.css shared/homepage/services.json /srv/homepage/
@@ -213,6 +217,10 @@ deploy_homepage() {
}
deploy_caddy() {
if [[ "$TARGET" != dankclaw ]]; then
echo "caddy is owned by dankclaw; refusing to deploy it on $TARGET" >&2
return 2
fi
copy_shared_config
render_caddyfile
deploy_homepage