mumble-moderator/bin/entrypoint.sh
2020-08-17 00:47:11 +02:00

20 lines
571 B
Bash
Executable file

#!/bin/bash
if [ ! -f /data/mumo.ini ]
then
cp -r /mumo/mumo.ini /mumo/modules /mumo/modules-available /data
mkdir -p /data/modules-enabled
fi
# Mumo apparently refuses to read config from mounted dirs,
# so we copy them ...
cp -r /data/mumo.ini /mumo
# if additional configuration is defined, we will replace our local default config.
[ -f /data/modules-enabled ] && cp -r /data/modules-enabled /mumo
[ -f /data/modules ] && cp -r /data/modules /mumo
# make sure our dir is writable for the user
chown mumo:mumo /mumo -R
exec su mumo -c "python3 /mumo/mumo.py"