Fix Matrix credentials modal: write individual credential files and update hub config

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/f4c4df17-1ef8-4b72-be8a-82472a5f4476

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-03 16:12:00 +00:00
committed by GitHub
parent 9dd08dc2ae
commit b1386ba701
2 changed files with 22 additions and 1 deletions

View File

@@ -226,6 +226,23 @@ CREDS
fi
chmod 600 "$CREDS_FILE"
# Write individual credential files for the hub UI (umask 077 ensures 600 from creation)
PREEXISTING_NOTE="Password set during original setup"
(umask 077; echo "https://$DOMAIN" > /var/lib/secrets/matrix-homeserver-url)
(umask 077; echo "@$ADMIN_USER:$DOMAIN" > /var/lib/secrets/matrix-admin-username)
if [ "$ADMIN_CREATED" = true ]; then
(umask 077; echo "$ADMIN_PASS" > /var/lib/secrets/matrix-admin-password)
else
(umask 077; echo "$PREEXISTING_NOTE" > /var/lib/secrets/matrix-admin-password)
fi
(umask 077; echo "@$TEST_USER:$DOMAIN" > /var/lib/secrets/matrix-test-username)
if [ "$TEST_CREATED" = true ]; then
(umask 077; echo "$TEST_PASS" > /var/lib/secrets/matrix-test-password)
else
(umask 077; echo "$PREEXISTING_NOTE" > /var/lib/secrets/matrix-test-password)
fi
echo "Matrix users setup completed."
fi
'';