Update debian11_container.sh

This commit is contained in:
tteck 2021-09-28 18:11:42 -04:00 committed by GitHub
parent c7b4f5c197
commit 1c6be12c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,14 @@
#!/usr/bin/env bash
while true; do
read -p "This will create a New Debian 11+ LXC Container. Proceed(y/n)?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
# Setup script environment
set -o errexit #Exit immediately if a pipeline returns a non-zero status
set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell
@ -156,4 +165,4 @@ pct exec $CTID /debian11_setup.sh
# Get network details and show completion message
IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}')
info "Successfully created a Debian 11 LXC Container to $CTID at IP Address ${IP}"
info "Successfully created a Debian 11 LXC Container to $CTID at IP Address ${IP}"