From 63bf4fb9863701bc9ec25b5cd45053250d053146 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 17 Aug 2020 00:47:11 +0200 Subject: [PATCH] Debug --- bin/entrypoint.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 893a05c..af31c66 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -2,21 +2,19 @@ if [ ! -f /data/mumo.ini ] then - cp /mumo/mumo.ini /data - - chmod a+rw /data/mumo.ini - cp -r /mumo/modules /data - cp -r /mumo/modules-available /data + 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 -cp -r /data/modules-enabled /mumo -cp -r /data/modules /mumo -# make sure the data dir is writable +# 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"