docker-run.sh 635 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. if [ ! -f /data/config.yaml ]; then
  3. cp /opt/mautrix-whatsapp/example-config.yaml /data/config.yaml
  4. echo "Didn't find a config file."
  5. echo "Copied default config file to /data/config.yaml"
  6. echo "Modify that config file to your liking."
  7. echo "Start the container again after that to generate the registration file."
  8. exit
  9. fi
  10. if [ ! -f /data/registration.yaml ]; then
  11. /usr/bin/mautrix-whatsapp -g -c /data/config.yaml -r /data/registration.yaml
  12. echo "Didn't find a registration file."
  13. echo "Generated one for you."
  14. echo "Copy that over to synapses app service directory."
  15. exit
  16. fi
  17. cd /data
  18. /usr/bin/mautrix-whatsapp