Merge PR #20: Add compatbility support for old murmur.sqlite db

Problem:
Since mumble_server_config.ini is recreated every time, users of the old database filename murmur.sqlite will have their existing database ignored by the new default configuration setting.

Solution:
If the old murmur.sqlite database file exists in ${DATA_DIR}, use that as the database file.
This should cleanly support users of the old database.
pull/21/head
Robert Adam 2022-09-15 09:18:53 +02:00 zatwierdzone przez GitHub
commit f5117e74d1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -98,6 +98,14 @@ else
# Apply default settings if they're missing
# Compatibilty with old DB filename
OLD_DB_FILE="${DATA_DIR}/murmur.sqlite"
if [[ -f "$OLD_DB_FILE" ]]; then
set_config "database" "$OLD_DB_FILE" true
else
set_config "database" "${DATA_DIR}/mumble-server.sqlite" true
fi
set_config "database" "${DATA_DIR}/mumble-server.sqlite" true
set_config "ice" "\"tcp -h 127.0.0.1 -p 6502\"" true
set_config "welcometext" "\"<br />Welcome to this server, running the official Mumble Docker image.<br />Enjoy your stay!<br />\"" true