From 1214c54c3554cf6ab794446b205c6a11e14e5cea Mon Sep 17 00:00:00 2001 From: Fernando Enzo Guarini Date: Thu, 9 Apr 2020 13:27:22 +0200 Subject: [PATCH] Put the mkdir at the beginning of the script Now it's just written once, but it covers the two previous cases where it was used. --- docker/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/run.sh b/docker/run.sh index 81b0a74..6caf45a 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -6,16 +6,16 @@ function fixperms { cd /opt/maubot +mkdir -p /var/log/maubot /data/plugins /data/trash /data/dbs + if [ ! -f /data/config.yaml ]; then cp docker/example-config.yaml /data/config.yaml - mkdir -p /var/log /data/plugins /data/trash /data/dbs echo "Config file not found. Example config copied to /data/config.yaml" echo "Please modify the config file to your liking and restart the container." fixperms exit fi -mkdir -p /var/log/maubot /data/plugins /data/trash /data/dbs alembic -x config=/data/config.yaml upgrade head fixperms exec su-exec $UID:$GID python3 -m maubot -c /data/config.yaml -b docker/example-config.yaml