docker-run.sh 790 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # Define functions.
  3. function fixperms {
  4. chown -R $UID:$GID /data /opt/mautrix-signal
  5. }
  6. cd /opt/mautrix-signal
  7. if [ ! -f /data/config.yaml ]; then
  8. cp example-config.yaml /data/config.yaml
  9. echo "Didn't find a config file."
  10. echo "Copied default config file to /data/config.yaml"
  11. echo "Modify that config file to your liking."
  12. echo "Start the container again after that to generate the registration file."
  13. fixperms
  14. exit
  15. fi
  16. if [ ! -f /data/registration.yaml ]; then
  17. python3 -m mautrix_signal -g -c /data/config.yaml -r /data/registration.yaml
  18. echo "Didn't find a registration file."
  19. echo "Generated one for you."
  20. echo "Copy that over to synapses app service directory."
  21. fixperms
  22. exit
  23. fi
  24. fixperms
  25. exec su-exec $UID:$GID python3 -m mautrix_signal -c /data/config.yaml