mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 01:31:51 +02:00
Update 20-folders.sh
This commit is contained in:
@@ -7,9 +7,12 @@ CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
|
|||||||
# Create directory
|
# Create directory
|
||||||
mkdir -p "$CONFIGSOURCE"
|
mkdir -p "$CONFIGSOURCE"
|
||||||
|
|
||||||
|
# If no file, provide example
|
||||||
|
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -rn /app/data/configurations/* "$CONFIGSOURCE"/
|
||||||
|
|
||||||
# Create symlinks
|
# Create symlinks
|
||||||
rm -r /data/configurations
|
rm -r /app/data/configurations
|
||||||
ln -sf "$CONFIGSOURCE" /data/configurations
|
ln -sf "$CONFIGSOURCE" /app/data/configurations
|
||||||
|
|
||||||
# Make sure permissions are right
|
# Make sure permissions are right
|
||||||
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|
||||||
|
|||||||
Reference in New Issue
Block a user