summaryrefslogtreecommitdiffstats
path: root/wiki/src/blueprint/mumble-server
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/src/blueprint/mumble-server')
-rwxr-xr-xwiki/src/blueprint/mumble-server7
1 files changed, 5 insertions, 2 deletions
diff --git a/wiki/src/blueprint/mumble-server b/wiki/src/blueprint/mumble-server
index 883b3f4..86efca9 100755
--- a/wiki/src/blueprint/mumble-server
+++ b/wiki/src/blueprint/mumble-server
@@ -25,7 +25,8 @@ PASSWORD="$(cat "${MUMBLE}/password")"
# Configure mumble-server
-sed -i "s%^database=/var/lib/mumble-server/mumble-server.sqlite%database=${MUMBLE}/mumble-server.sqlite%" "${CONFIG}"
+DATABASE="${MUMBLE}/mumble-server.sqlite"
+sed -i "s%^database=/var/lib/mumble-server/mumble-server.sqlite%database=${DATABASE}%" "${CONFIG}"
sed -i "s%^serverpassword=$%serverpassword=${PASSWORD}%" "${CONFIG}"
if [ -n "${MUMBLE_LISTEN_ON_LAN}" ]; then
sed -i "s%^host=%#host=%" "${CONFIG}"
@@ -38,9 +39,10 @@ fi
apt-get --yes --quiet --quiet install sqlite3
systemctl start mumble-server # To generate the database
+chown mumble-server:mumble-server "${DATABASE}"
systemctl stop mumble-server # To unlock database
-FINGERPRINT="$(sqlite3 "${MUMBLE}/mumble-server.sqlite" "select value from config where key = 'certificate';" | openssl x509 -fingerprint | head -n 1 | cut -d '=' -f 2)"
+FINGERPRINT="$(sqlite3 "${DATABASE}" "select value from config where key = 'certificate';" | openssl x509 -fingerprint | head -n 1 | cut -d '=' -f 2)"
# Configure Tor hidden service
@@ -52,6 +54,7 @@ grep --quiet "^/dev/mapper/TailsData_unlocked ${ONION}" /proc/mounts || mount --
grep --quiet "^HiddenServiceDir ${ONION}$" /etc/tor/torrc || echo "HiddenServiceDir ${ONION}" >> /etc/tor/torrc
grep --quiet "^HiddenServicePort ${PORT}$" /etc/tor/torrc || echo "HiddenServicePort ${PORT}" >> /etc/tor/torrc
+
# Restart Tor and Mumble server
systemctl start mumble-server