mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-29 02:36:05 +02:00
Create 10-migrate.sh
This commit is contained in:
14
guacamole/rootfs/etc/cont-init.d/10-migrate.sh
Normal file
14
guacamole/rootfs/etc/cont-init.d/10-migrate.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Migrate database #
|
||||||
|
####################
|
||||||
|
|
||||||
|
slug=guacamole
|
||||||
|
|
||||||
|
if [ -d /homeassistant/addons_config/"$slug" ] && [ ! -d /config/postgres ]; then
|
||||||
|
echo "Moving database to new location /config"
|
||||||
|
cp -rf /homeassistant/addons_config/"$slug"/* /config/
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user