From 16d4339af6a374bb91e1fa0b2ab2402b91ae8537 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Wed, 15 Mar 2023 11:19:34 -0400 Subject: [PATCH] Prompt and help udpates. --- deployment/destroy.sh | 5 +---- deployment/help.txt | 4 ++-- deployment/update.sh | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/deployment/destroy.sh b/deployment/destroy.sh index 584e486..a99bfdf 100755 --- a/deployment/destroy.sh +++ b/deployment/destroy.sh @@ -10,10 +10,7 @@ if lxc remote get-default | grep -q "local"; then exit 1 fi -echo "WARNING: this script backs up your existing remote and saves all data locally in the SSME." -echo " Then, all your VMs are destroyed on the remote resulting is destruction of user data." -echo " But then we re-create everything using the new codebase, then restore user data to the" -echo " newly provisioned VMs." +echo "WARNING: This will DESTROY any existing VMs!" RESPONSE= read -r -p "Are you sure you want to continue (y/n): ": RESPONSE diff --git a/deployment/help.txt b/deployment/help.txt index 4f12751..3d5e011 100644 --- a/deployment/help.txt +++ b/deployment/help.txt @@ -1,5 +1,5 @@ -You are in the Sovereign Stack management environment. From here, you can issue several commands: +You are in the Sovereign Stack Management Environment (SSME). From here, you can issue several commands: ss-remote - Take a remote SSH endpoint under management of Sovereign Stack. ss-deploy - Creates a deployment to your active LXD remote. @@ -7,6 +7,6 @@ You are in the Sovereign Stack management environment. From here, you can issue ss-update - brings an existing deployment up to the newest version of Sovereign Stack. ss-show - show the lxd resources associated with the current remote. -For more infomation about all these topics, consult the Sovereign Stack website. Relevant posts include: +For more infomation about all these topics, consult the Sovereign Stack website starting with: - https://www.sovereign-stack.org/tag/instance-management/ diff --git a/deployment/update.sh b/deployment/update.sh index a63d0d2..1958988 100755 --- a/deployment/update.sh +++ b/deployment/update.sh @@ -11,6 +11,20 @@ if git update-index --refresh | grep -q "needs update"; then exit 1 fi + +echo "WARNING: this script backs up your existing remote and saves all data locally in the SSME." +echo " Then, all your VMs are destroyed on the remote resulting is destruction of user data." +echo " But then we re-create everything using the new codebase, then restore user data to the" +echo " newly provisioned VMs." + +RESPONSE= +read -r -p "Are you sure you want to continue (y/n): ": RESPONSE +if [ "$RESPONSE" != "y" ]; then + echo "STOPPING." + exit 0 +fi + + USER_TARGET_PROJECT= # grab any modifications from the command line.