Skip to content

Commit

Permalink
Create 00-migrate_files.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Nov 22, 2024
1 parent 873ce7f commit ce85541
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nextcloud/rootfs/etc/cont-init.d/00-migrate_files.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ce85541

Please sign in to comment.