auto-mc-redux/undeploy.sh

12 lines
338 B
Bash
Executable file

#!/usr/bin/env bash
install_dir="$(dirname "$(readlink -f "$0")")" # find the install directory
source "$install_dir/functions.sh"
data_dir get
config get
machine show ipv4 | jq -r .ip_address | read ipv4_address
ssh root@$ipv4_address <<<mc-backup > "$data_dir/server.tar.zstd"
if [ $DOMAIN ]; then
domain A destroy
fi
machine destroy