From 57d06ad2bef3e2dc01a4ba16297d830096203d2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 04:48:34 -0500 Subject: [PATCH] Update home-assistant-core-copy-data-home-assistant-core.sh Stop both containers. --- .../home-assistant-core-copy-data-home-assistant-core.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index c0cf2868..68c388ed 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -83,6 +83,10 @@ whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" -- $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.03" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" +if [ $(pct status $CTID_FROM | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_FROM'..." + pct stop $CTID_FROM +fi if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then msg "Stopping '$CTID_TO'..." pct stop $CTID_TO