forked from maubot/maubot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3621ddc
commit 6ea1b00
Showing
2 changed files
with
16 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
#!/bin/sh | ||
|
||
function fixperms { | ||
chown -R $UID:$GID /var/log /data /opt/maubot | ||
} | ||
|
||
cd /opt/maubot | ||
|
||
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 | ||
if [ ! -f /config/config.yaml ]; then | ||
echo "Config file not found." | ||
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 | ||
mkdir -p /data/trash /data/dbs | ||
alembic -x config=/config/config.yaml upgrade head | ||
python3 -m maubot -c /config/config.yaml |