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.
This commit is contained in:
parent
2881344489
commit
1214c54c35
1 changed files with 2 additions and 2 deletions
|
@ -6,16 +6,16 @@ function fixperms {
|
||||||
|
|
||||||
cd /opt/maubot
|
cd /opt/maubot
|
||||||
|
|
||||||
|
mkdir -p /var/log/maubot /data/plugins /data/trash /data/dbs
|
||||||
|
|
||||||
if [ ! -f /data/config.yaml ]; then
|
if [ ! -f /data/config.yaml ]; then
|
||||||
cp docker/example-config.yaml /data/config.yaml
|
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 "Config file not found. Example config copied to /data/config.yaml"
|
||||||
echo "Please modify the config file to your liking and restart the container."
|
echo "Please modify the config file to your liking and restart the container."
|
||||||
fixperms
|
fixperms
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /var/log/maubot /data/plugins /data/trash /data/dbs
|
|
||||||
alembic -x config=/data/config.yaml upgrade head
|
alembic -x config=/data/config.yaml upgrade head
|
||||||
fixperms
|
fixperms
|
||||||
exec su-exec $UID:$GID python3 -m maubot -c /data/config.yaml -b docker/example-config.yaml
|
exec su-exec $UID:$GID python3 -m maubot -c /data/config.yaml -b docker/example-config.yaml
|
||||||
|
|
Loading…
Reference in a new issue