From bdaaed3aaf67bdb3a362baf79d1dc730700de6fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:12:40 -0500 Subject: [PATCH] Update and rename k0s-install.sh to k0s-v5-install.sh --- install/{k0s-install.sh => k0s-v5-install.sh} | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename install/{k0s-install.sh => k0s-v5-install.sh} (88%) diff --git a/install/k0s-install.sh b/install/k0s-v5-install.sh similarity index 88% rename from install/k0s-install.sh rename to install/k0s-v5-install.sh index 1ed9806f..785160c7 100644 --- a/install/k0s-install.sh +++ b/install/k0s-v5-install.sh @@ -19,7 +19,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR - +silent() { "$@" > /dev/null 2>&1; } function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -76,20 +76,20 @@ alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +$STD apt-get update +$STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing k0s Kubernetes" -sh <(curl -sSLf https://get.k0s.sh) &>/dev/null -k0s install controller --single &>/dev/null -k0s start &>/dev/null +$STD bash <(curl -sSLf https://get.k0s.sh) +$STD k0s install controller --single +$STD k0s start mkdir -p /etc/k0s k0s config create > /etc/k0s/k0s.yaml msg_ok "Installed k0s Kubernetes" @@ -103,7 +103,7 @@ fi if [[ $HELM == "Y" ]]; then msg_info "Installing Helm" -curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash &>/dev/null +$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) msg_ok "Installed Helm" fi PASS=$(grep -w "root" /etc/shadow | cut -b6) @@ -128,6 +128,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then fi msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null +$STD apt-get autoremove +$STD apt-get autoclean msg_ok "Cleaned"