From 2450e41b37b3a0b760f40dea0ffdd9ade6400695 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Jan 2022 09:23:49 -0500 Subject: [PATCH] Update z2m-copy-data.sh --- misc/z2m-copy-data.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/z2m-copy-data.sh b/misc/z2m-copy-data.sh index a2320f95..a698ef35 100644 --- a/misc/z2m-copy-data.sh +++ b/misc/z2m-copy-data.sh @@ -83,7 +83,10 @@ whiptail --defaultno --title "$TITLE" --yesno \ $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.23" 13 50 || exit info "Zigbee2MQTT Data from '$CTID_FROM' to '$CTID_TO'" - +if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_TO'..." + pct stop $CTID_TO +fi msg "Mounting Container Disks..." DATA_PATH=/opt/zigbee2mqtt/data/ CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \