From 6f0788f220436e67ec334874d267f09d5d8ddc8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Dec 2023 19:51:33 -0500 Subject: [PATCH] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 301c4a7e..70d77945 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -6,6 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { +clear cat <<"EOF" ______ _ __ __ /_ __/___ _(_) /_____________ _/ /__ @@ -15,8 +16,8 @@ cat <<"EOF" EOF } -clear header_info +set-e while true; do read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn case $yn in @@ -25,23 +26,7 @@ while true; do *) echo "Please answer yes or no." ;; esac done - -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 -} +header_info function msg() { local TEXT="$1" echo -e "$TEXT"