mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01: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
|
||||
|
||||
CONFIGLOCATION=$(bashio::config "CONFIG_LOCATION")
|
||||
|
||||
# Create directory
|
||||
mkdir -p /config/addons_config/papermerge/config
|
||||
mkdir -p $CONFIGLOCATION/config
|
||||
|
||||
# Copy previous config if existing
|
||||
if [ -d /data/config ]; then
|
||||
echo "Moving to new location /config/addons_config/papermerge"
|
||||
mv /data/config/* /config/addons_config/papermerge/config/
|
||||
echo "Moving to new location $CONFIGLOCATION"
|
||||
mv /data/config/* $CONFIGLOCATION/config/
|
||||
rm -r /data/config
|
||||
fi
|
||||
|
||||
# Make symlinks
|
||||
ln -snf -T /config/addons_config/papermerge /data/config
|
||||
ln -snf -T $CONFIGLOCATION/config /data/config
|
||||
|
||||
# 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