1 2 3 4 5 6 7 8 9
#!/usr/bin/env sh set -x mkdir -p /var/lib/matrix-synapse if [ ! -f "/var/lib/matrix-synapse/registration_shared_secret.txt" ] then cat /dev/urandom | tr -dc a-zA-Z0-9 | fold -w 256 | head -n 1 | tee /var/lib/matrix-synapse/registration_shared_secret.txt else echo Not generating key, key exists fi