mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Update and rename 20-folders.sh to 20-migration_config.sh
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bashio
|
|
||||||
# shellcheck shell=bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
|
||||||
CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
|
|
||||||
|
|
||||||
# Create directory
|
|
||||||
mkdir -p "$CONFIGSOURCE" || true
|
|
||||||
mkdir -p "$CONFIGSOURCE/import_files" || true
|
|
||||||
mkdir -p "$CONFIGSOURCE/configurations" || true
|
|
||||||
|
|
||||||
# Make sure permissions are right
|
|
||||||
chown -R "root:root" "$CONFIGSOURCE"
|
|
||||||
chmod -R 755 "$CONFIGSOURCE"
|
|
||||||
19
fireflyiii_data_importer/rootfs/etc/cont-init.d/20-migration_config.sh
Executable file
19
fireflyiii_data_importer/rootfs/etc/cont-init.d/20-migration_config.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
slug=fireflyiii_data_importer
|
||||||
|
|
||||||
|
if [ -d "/homeassistant/addons_config/$slug" ]; then
|
||||||
|
echo "Migrating /homeassistant/addons_config/$slug"
|
||||||
|
mv /homeassistant/addons_config/"$slug"/* /config/ || true
|
||||||
|
rm -r /homeassistant/addons_config/"$slug"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create directory
|
||||||
|
mkdir -p /config/import_files
|
||||||
|
mkdir -p /config/configurations
|
||||||
|
|
||||||
|
# Make sure permissions are right
|
||||||
|
chown -R "root:root" /config
|
||||||
|
chmod -R 755 /config
|
||||||
Reference in New Issue
Block a user