Skip to content

Commit

Permalink
Merge PR #20: Add compatbility support for old murmur.sqlite db
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Krzmbrzl authored Sep 15, 2022
2 parents 141af41 + 711c0bb commit f5117e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5117e7

Please sign in to comment.