Wykres commitów

27 Commity (master)

Autor SHA1 Wiadomość Data
Michael Pryshliak 81dae4bf95
fix: exec on su-exec call to remain PID 1 2025-03-11 02:27:11 +02:00
Robert Adam a8e5e9a658 Streamline indentation in entrypoint 2025-01-10 11:27:57 +01:00
Nita Vesa 23e85bc84d feat: add support for PUID and PGID environment variables
This commit removes the hardcoded MUMBLE_UID and MUMBLE_GID and instead
adopts the commonly used PUID and PGID environment variables for setting
the desired UID:GID for mumble-server to run as. For backwards-compatibility
they still default to 10000:10000.

Also, a new variable `MUMBLE_CHOWN_DATA` is used to define whether to chown
`/data` and its contents or not.

Fixes #34

Signed-off-by: Nita Vesa <nita.vesa@outlook.com>
2025-01-10 11:25:31 +01:00
Maximilian Weiler c0ac92af44
fix: Address code review comments
- Split comment in config file into two lines
- De-duplicate incovation for setting superuser password
2022-12-29 22:17:15 +01:00
Maximilian Weiler c8b2fb353c
feature: Allow loading config values from secrets
- Check /run/secrets/MUMBLE_CONFIG_* and handle their content
2022-12-04 21:40:37 +01:00
Robert Adam b354cddda9
Remove redundant config default 2022-09-16 10:04:30 +02:00
restitux 2fd60e3407 Don't set welcometext if welcometextfile is set 2022-09-15 15:06:35 -06:00
restitux 711c0bbe9f Add compatbility support for old mumble.sqlite db 2022-09-14 14:13:59 -06:00
Robert Adam 61aba4b1cd Name default DB mumble-server.sqlite 2022-09-11 10:04:07 +02:00
Robert Adam 41e642eab3 Don't log value of sensitive configs
Fixes #15
2022-08-22 12:57:43 +02:00
Michel Pawlak 3ee0ef3d63 fix indentation 2022-06-30 18:01:29 +02:00
Michel Pawlak 0d9bc1e0ea add option to accept unknown settings 2022-06-30 17:56:15 +02:00
Azlux e2c4855d2c Fixing readonly variable 2022-05-17 00:37:28 +02:00
d3adb5 cf6a9fb4bf
refactor: use name normalizing function + sed for env vars
Add a function to "normalize" the name of config options that will be
used, while using sed instead of grep to both retrieve and manipulate
the names of environment variables that start with MUMBLE_CONFIG_.
2022-05-15 14:15:51 -03:00
d3adb5 3f908fd921
fix: remove underscores from cfg options in assoc array
Remove any possible underscores from the config options when creating
keys for the associative array used to look them up after capturing
environment variables.

This is a possible regression from fc0363a.
2022-05-15 10:43:12 -03:00
d3adb5 fc0363a448
refactor: use associative array for existing options
Use Bash's associative array for the existing configuration options and
for the translation of something like "DBUSER" to "dbUser", replacing
the for loop that existed before.
2022-05-10 21:48:48 -03:00
d3adb5 0f4fd08fe4
docs: restore a few comments removed in ec402cb
Restore a few of the comments removed in ec402cb.
2022-05-10 21:31:06 -03:00
d3adb5 8f23ab8913
refactor: populate existing_config_options with readarray
Populate the array that contains existing configuration options obtained
from the bare-bones configuration file using Bash's readarray builtin.
2022-05-10 20:29:49 -03:00
d3adb5 7f3c2c1996
refactor: eliminate shellcheck warnings & errors
Redirect multiple commands to the configuration file instead of making
multiple redirects, potentially limiting the number of times the file
needs to be opened for appending. (SC2129)

Use "${arr[*]}" not to mix array and string. (SC2145)
2022-05-08 22:40:44 -03:00
d3adb5 35cb859dc4
refactor: declare most relevant variables at the start
Declare the most relevant variables at the start of the script, so the
reader can be made aware of them more quickly.
2022-05-08 22:40:43 -03:00
d3adb5 ec402cb89b
refactor: remove comment clutter
Remove most comments and shorten some others. Focus should be on making
code clean and immediately readable instead of documented directly in
the script file.
2022-05-08 22:40:43 -03:00
d3adb5 9166af6125
refactor: shorten functions in entrypoint script
Shorten `array_contains` and `set_config` in a way that, in my opinion,
is still readable.
2022-05-08 22:10:42 -03:00
d3adb5 18649e6f87
refactor: inline a couple of if statements
Inline a couple of if statements for a shorter, even if not by much,
script.
2022-05-08 21:22:01 -03:00
d3adb5 c49e2c17fc
refactor: remove trailing whitespace
Remove trailing whitespace while there isn't much. This is discouraged,
since it can mess with git-blame information, but it irks me there is
trailing whitespace.

This commit might be dropped if requested during review. :(
2022-05-08 21:13:03 -03:00
d3adb5 4b57f8c040
refactor: use bash's extended test ([[]])
Replace the standard POSIX test command ([]) with Bash's builtin ([[]])
for consistency.

There was a single use of the double bracket syntax, but since the
script references Bash in its shebang, we might as well use it instead
of the POSIX one.
2022-05-08 21:07:09 -03:00
d3adb5 6b48b365d1
refactor: eliminate if by grep'ing for MUMBLE_CONFIG_
Use grep to fetch only environment variables that start with
`MUMBLE_CONFIG_`, rather than manually compare in an if statement,
getting rid of one level of indentation.
2022-05-08 20:53:47 -03:00
Robert Adam 097db0cbcc Add initial version
Co-Authored-By: Azlux <github@azlux.fr>
2022-05-07 12:31:25 +02:00