Skip to content

Commit

Permalink
Update 20-folders.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Jan 31, 2024
1 parent 5ce2a4d commit ae69486
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions postgres/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
# shellcheck shell=bash
set -e

if [ -d /data/database ]; then
bashio::log.warning "Database migrated to /config"
mv /data/database /config
fi

if [ -f /homeassistant/addons_config/postgres/config.yaml ]; then
bashio::log.warning "Config migrated to /config"
mv /homeassistant/addons_config/postgres/* /config/
rm -r /homeassistant/addons_config/postgres
fi

0 comments on commit ae69486

Please sign in to comment.