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

This commit is contained in:
gyurix
2025-09-02 11:15:31 +02:00
parent 72cb30e706
commit 19f73fb5ab

View File

@@ -118,10 +118,10 @@ register_admin_user() {
echo "Admin user created successfully!" echo "Admin user created successfully!"
# renmove registration_shared_secret from homeserver.yaml for security # renmove registration_shared_secret from homeserver.yaml for security
yq eval '.registration_shared_secret = ""' /data/homeserver.yaml > /data/homeserver.yaml.tmp && mv /data/homeserver.yaml.tmp /data/homeserver.yaml 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 # trigger a restart of synapse to reload config
echo '{"NAME":"service-matrix.containers.matrixserver-app"}' | jq -r > /var/tmp/input/upgrade.json echo '{"NAME":"service-matrix.containers.matrixserver-app"}' | jq -r > /var/tmp/shared/input/upgrade.json
echo "Matrix server app restart requested" echo "Matrix server app restart requested"
return 0 return 0