2018-11-04 16:05:39 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
function fixperms {
|
|
|
|
chown -R $UID:$GID /var/log /data /opt/maubot
|
|
|
|
}
|
|
|
|
|
|
|
|
cd /opt/maubot
|
|
|
|
|
2020-04-09 07:27:22 -04:00
|
|
|
mkdir -p /var/log/maubot /data/plugins /data/trash /data/dbs
|
|
|
|
|
2018-11-04 16:05:39 -05:00
|
|
|
if [ ! -f /data/config.yaml ]; then
|
|
|
|
cp docker/example-config.yaml /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."
|
|
|
|
fixperms
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2019-09-28 11:25:30 -04:00
|
|
|
alembic -x config=/data/config.yaml upgrade head
|
2018-11-04 16:05:39 -05:00
|
|
|
fixperms
|
|
|
|
exec su-exec $UID:$GID python3 -m maubot -c /data/config.yaml -b docker/example-config.yaml
|