Compare commits
7 commits
60e6fc5fca
...
e24c610e8d
Author | SHA1 | Date | |
---|---|---|---|
e24c610e8d | |||
f1baa0f141 | |||
147908bb41 | |||
63bf4fb986 | |||
dd5211e485 | |||
fdb545c557 | |||
46a167660e |
1 changed files with 9 additions and 15 deletions
|
@ -2,25 +2,19 @@
|
||||||
|
|
||||||
if [ ! -f /data/mumo.ini ]
|
if [ ! -f /data/mumo.ini ]
|
||||||
then
|
then
|
||||||
cp /mumo/mumo.ini /data
|
cp -r /mumo/mumo.ini /mumo/modules /mumo/modules-available /data
|
||||||
|
|
||||||
sed -i 's/mumo.log/\/data\/mumo.log/' /data/mumo.ini
|
|
||||||
sed -i 's/modules\//\/data\/modules\//' /data/mumo.ini
|
|
||||||
sed -i 's/modules-enabled\//\/data\/modules-enabled\//' /data/mumo.ini
|
|
||||||
|
|
||||||
chmod a+rw /data/mumo.ini
|
|
||||||
cp -r /mumo/modules-available /data
|
|
||||||
mkdir -p /data/modules-enabled
|
mkdir -p /data/modules-enabled
|
||||||
|
|
||||||
echo Created mumo default config data. Exiting.
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mumo apparently refuses to read config from mounted dirs,
|
# Mumo apparently refuses to read config from mounted dirs,
|
||||||
# so we copy them ...
|
# so we copy them ...
|
||||||
cp -r /data/mumo.ini /mumo
|
cp -r /data/mumo.ini /mumo
|
||||||
cp -r /data/modules /mumo # TODO: Add from git
|
|
||||||
cp -r /data/modules-available /mumo
|
|
||||||
cp -r /data/modules-enabled /mumo
|
|
||||||
|
|
||||||
exec su mumo -c "python3 /mumo/mumo.py"
|
# if additional configuration is defined, we will replace our local default config.
|
||||||
|
[ -d /data/modules-enabled ] && cp -r /data/modules-enabled /mumo
|
||||||
|
[ -d /data/modules ] && rm -rf /mumo/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 --app --ini /mumo/mumo.ini"
|
||||||
|
|
Loading…
Reference in a new issue