summary refs log tree commit diff
path: root/old stuff/Spacebar-synapse/pre-rebuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'old stuff/Spacebar-synapse/pre-rebuild.sh')
-rwxr-xr-xold stuff/Spacebar-synapse/pre-rebuild.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/old stuff/Spacebar-synapse/pre-rebuild.sh b/old stuff/Spacebar-synapse/pre-rebuild.sh
new file mode 100755
index 0000000..32905e3
--- /dev/null
+++ b/old stuff/Spacebar-synapse/pre-rebuild.sh
@@ -0,0 +1,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
\ No newline at end of file