mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-08 16:45:56 +02:00
Update 20-folders.sh
https://github.com/alexbelgium/hassio-addons/issues/163
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/usr/bin/env bashio
|
||||||
|
|
||||||
|
CONFIGLOCATION=$(bashio::config "CONFIG_LOCATION")
|
||||||
|
|
||||||
# Create directory
|
# Create directory
|
||||||
mkdir -p /config/addons_config/papermerge/config
|
mkdir -p $CONFIGLOCATION/config
|
||||||
|
|
||||||
# Copy previous config if existing
|
# Copy previous config if existing
|
||||||
if [ -d /data/config ]; then
|
if [ -d /data/config ]; then
|
||||||
echo "Moving to new location /config/addons_config/papermerge"
|
echo "Moving to new location $CONFIGLOCATION"
|
||||||
mv /data/config/* /config/addons_config/papermerge/config/
|
mv /data/config/* $CONFIGLOCATION/config/
|
||||||
rm -r /data/config
|
rm -r /data/config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make symlinks
|
# Make symlinks
|
||||||
ln -snf -T /config/addons_config/papermerge /data/config
|
ln -snf -T $CONFIGLOCATION/config /data/config
|
||||||
|
|
||||||
# Make sure permissions are right
|
# Make sure permissions are right
|
||||||
chown -R $(id -u):$(id -g) /config/addons_config/papermerge
|
chown -R $(id -u):$(id -g) $CONFIGLOCATION
|
||||||
|
|||||||
Reference in New Issue
Block a user