mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-03 16:00:29 +01:00
20 lines
449 B
Bash
20 lines
449 B
Bash
#!/usr/bin/env bashio
|
|
|
|
CONFIGLOCATION=$(bashio::config "CONFIG_LOCATION")
|
|
|
|
# Create directory
|
|
mkdir -p $CONFIGLOCATION/config
|
|
|
|
# Copy previous config if existing
|
|
if [ -d /data/config ]; then
|
|
echo "Moving to new location $CONFIGLOCATION"
|
|
mv /data/config/* $CONFIGLOCATION/config/
|
|
rm -r /data/config
|
|
fi
|
|
|
|
# Make symlinks
|
|
ln -snf -T $CONFIGLOCATION/config /data/config
|
|
|
|
# Make sure permissions are right
|
|
chown -R $(id -u):$(id -g) $CONFIGLOCATION
|