Skip to content

Commit 02192b6

Browse files
committed
arch: pass admin user to deploy.sh for config lookup
1 parent fb08734 commit 02192b6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

bin/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ fi
230230
echo "Deploying config..."
231231

232232
# Determine who invoked this (the admin user)
233-
DEPLOY_USER="${SUDO_USER:-$(whoami)}"
233+
# BAUDBOT_CONFIG_USER env var overrides detection (used by install.sh)
234+
DEPLOY_USER="${BAUDBOT_CONFIG_USER:-${SUDO_USER:-$(whoami)}}"
234235
DEPLOY_HOME=$(getent passwd "$DEPLOY_USER" | cut -d: -f6 2>/dev/null || echo "")
235236
ADMIN_CONFIG="$DEPLOY_HOME/.baudbot/.env"
236237

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ BAUDBOT_CONFIG_USER="$ADMIN_USER" bash "$REPO_DIR/bin/config.sh"
193193
# Deploy the config (and everything else) to the agent runtime.
194194
# This copies ~/.baudbot/.env → agent's ~/.config/.env with correct perms.
195195
header "Deploy"
196-
bash "$REPO_DIR/bin/deploy.sh"
196+
BAUDBOT_CONFIG_USER="$ADMIN_USER" bash "$REPO_DIR/bin/deploy.sh"
197197

198198
# ── Launch ───────────────────────────────────────────────────────────────────
199199

0 commit comments

Comments
 (0)