mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
17 lines
396 B
Bash
17 lines
396 B
Bash
#!/usr/bin/env bashio
|
|
# shellcheck shell=bash
|
|
|
|
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
|
CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
|
|
|
|
# Create directory
|
|
mkdir -p "$CONFIGSOURCE"
|
|
|
|
# Create symlinks
|
|
cp -rnf /data/configurations "$CONFIGSOURCE"
|
|
rm -r /data/configurations
|
|
ln -sf "$CONFIGSOURCE" /data/configurations
|
|
|
|
# Make sure permissions are right
|
|
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|