Update add-tailscale-lxc.sh

tweak
pull/2259/head
tteckster 11 months ago committed by GitHub
parent 79a542cd5a
commit 6f0788f220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@
# https://github.com/tteck/Proxmox/raw/main/LICENSE # https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info { function header_info {
clear
cat <<"EOF" cat <<"EOF"
______ _ __ __ ______ _ __ __
/_ __/___ _(_) /_____________ _/ /__ /_ __/___ _(_) /_____________ _/ /__
@ -15,8 +16,8 @@ cat <<"EOF"
EOF EOF
} }
clear
header_info header_info
set-e
while true; do while true; do
read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn
case $yn in case $yn in
@ -25,23 +26,7 @@ while true; do
*) echo "Please answer yes or no." ;; *) echo "Please answer yes or no." ;;
esac esac
done done
header_info
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR
function error_exit() {
trap - ERR
local reason="Unknown failure occured."
local msg="${1:-$reason}"
local flag="\e[1;31m‼ ERROR\e[0m $EXIT@$LINE"
echo -e "$flag $msg" 1>&2
exit $EXIT
}
function msg() { function msg() {
local TEXT="$1" local TEXT="$1"
echo -e "$TEXT" echo -e "$TEXT"

Loading…
Cancel
Save

Powered by BW's shoe-string budget.