mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Create 00-migrate_files.sh
This commit is contained in:
14
nextcloud/rootfs/etc/cont-init.d/00-migrate_files.sh
Normal file
14
nextcloud/rootfs/etc/cont-init.d/00-migrate_files.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Migrate files for new config location
|
||||
slug="nextcloud-ocr"
|
||||
if [ -f "/homeassistant/addons_config/$slug/config.yaml" ] && [ ! -f "/homeassistant/addons_config/$slug/migrated" ]; then
|
||||
bashio::log.warning "Migrating config.yaml"
|
||||
mv "/homeassistant/addons_config/$slug"/* /config/ || true
|
||||
echo "Migrated to internal config folder accessible at /addon_configs/xxx-nextcloud" > "/homeassistant/addons_config/$slug/migrated"
|
||||
fi
|
||||
|
||||
if [ -f "/homeassistant/addons_autoscripts/$slug.sh" ]; then
|
||||
bashio::log.warning "Migrating autoscript"
|
||||
mv /homeassistant/addons_autoscripts/nextcloud-ocr.sh /config/ || true
|
||||
fi
|
||||
Reference in New Issue
Block a user