Fix permissions for non-root user
This commit is contained in:
parent
f2f60ed9e2
commit
46a167660e
1 changed files with 5 additions and 6 deletions
|
@ -4,23 +4,22 @@ if [ ! -f /data/mumo.ini ]
|
|||
then
|
||||
cp /mumo/mumo.ini /data
|
||||
|
||||
sed -i 's/mumo.log/\/data\/mumo.log/' /data/mumo.ini
|
||||
sed -i 's/modules\//\/data\/modules\//' /data/mumo.ini
|
||||
sed -i 's/mumo.log/\/dev\/null/' /data/mumo.ini
|
||||
sed -i 's/mumo.pid/\/tmp\/mumo.pid/' /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
|
||||
|
||||
echo Created mumo default config data. Exiting.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Mumo apparently refuses to read config from mounted dirs,
|
||||
# so we copy them ...
|
||||
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
|
||||
|
||||
# make sure the data dir is writable
|
||||
chown mumo:mumo /data -R
|
||||
|
||||
exec su mumo -c "python3 /mumo/mumo.py"
|
||||
|
|
Loading…
Reference in a new issue