From 87440ef5f19a9823a1ae5548f6428817ece36bba Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 15 Dec 2023 17:13:58 +0100 Subject: [PATCH] Update 00-global_migration.sh --- .../rootfs/etc/cont-init.d/00-global_migration.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/00-global_migration.sh b/qbittorrent/rootfs/etc/cont-init.d/00-global_migration.sh index b5a52843e..897b6a778 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/00-global_migration.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/00-global_migration.sh @@ -21,20 +21,14 @@ if [ -f /homeassistant/addons_config/qBittorrent/qBittorrent.conf ] && [ ! -f /h if [ -d /config/qBittorrent/data/qBittorrent ]; then rm -r /config/qBittorrent/data/qBittorrent; fi touch /homeassistant/addons_config/qBittorrent/migrated bashio::log.yellow "... moved files from /config/addons_config/qBittorrent to /addon_configs/$HOSTNAME/qBitorrent (must be accessed with my Filebrowser addon)" -fi -if [ -d /homeassistant/openvpn ]; then - if [ "$(ls -A /homeassistant/openvpn)" ]; then + if [ -d /homeassistant/openvpn ]; then + if [ "$(ls -A /homeassistant/openvpn)" ]; then cp -rnf /homeassistant/openvpn/* /config/openvpn/ + fi fi fi -# Restore openvpn files -if [ "$(ls -A /config/openvpn)" ]; then - mkdir -p /homeassistant/openvpn - cp -rnf /config/openvpn/* /homeassistant/openvpn -fi - if [ -f /homeassistant/addons_config/qbittorrent/config.yaml ] && [ ! -f /homeassistant/addons_config/qbittorrent/migrated ]; then cp -rnf /homeassistant/addons_config/qbittorrent/* /config/ rm -r /homeassistant/addons_config/qbittorrent