3 Commits
1.0.1 ... main

Author SHA1 Message Date
86cd632416 Update start.sh
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-09-02 09:39:27 +00:00
gyurix
19f73fb5ab Update start.sh: fix path for homeserver.yaml and upgrade.json; enhance security by clearing registration_shared_secret
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-09-02 11:15:31 +02:00
gyurix
72cb30e706 Remove registration_shared_secret from homeserver.yaml for security; trigger restart of Synapse after admin user creation
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-09-02 10:27:22 +02:00

View File

@@ -116,6 +116,14 @@ register_admin_user() {
if echo "$response" | grep -q '"user_id"\|"access_token"'; then if echo "$response" | grep -q '"user_id"\|"access_token"'; then
echo "Admin user created successfully!" echo "Admin user created successfully!"
# renmove registration_shared_secret from homeserver.yaml for security
yq eval '.registration_shared_secret = ""' /data/homeserver.yaml > /tmp/homeserver.yaml.tmp && mv /tmp/homeserver.yaml.tmp /data/homeserver.yaml
# trigger a restart of synapse to reload config
echo '{"NAME":"service-matrix.containers.matrixserver-app"}' | jq -r > /var/tmp/shared/input/upgrade-matrix.json
echo "Matrix server app restart requested"
return 0 return 0
else else
echo "Failed to create admin user. Response: $response" echo "Failed to create admin user. Response: $response"
@@ -135,7 +143,6 @@ check_admin_by_login() {
if echo "$response" | grep -q access_token; then if echo "$response" | grep -q access_token; then
echo "Successfully logged in as admin user" echo "Successfully logged in as admin user"
yq eval '.registration_shared_secret = ""' /data/homeserver.yaml > /data/homeserver.yaml.tmp && mv /data/homeserver.yaml.tmp /data/homeserver.yaml
return 0 # User exists and password is correct return 0 # User exists and password is correct
fi fi