diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index e1a2e1f3..1be76ec7 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,51 +1,20 @@ #!/usr/bin/env bash -#source $(dirname $FUNCTIONS_FILE_PATH) -#source "$FUNCTIONS_FILE_PATH" -#source "$FUNCTIONS_FILE_PATH" > /dev/null -#function_script=$(mktemp) -#wget -qO "$function_script" https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/function.sh -#source "$function_script" -#source <(wget -qO- https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/function.sh) -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" -#source /dev/stdin <<< wget -qO- https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/function.sh -#source /dev/stdin <<< "$(wget -qO- https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/function.sh)" -#wget -qO /tmp/function.sh https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/function.sh -#chmod +x /tmp/function.sh -#source /tmp/function.sh # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" +color set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Setting up Container OS" setting_up_container -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - network_ckeck - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +update_os msg_info "Installing Dependencies" $STD apt-get install -y curl @@ -53,16 +22,12 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* +motd if ! getent shadow root | grep -q "^root:[^\!*]"; then customize fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" -rm "$function_script" $STD apt-get autoremove $STD apt-get autoclean -msg_ok "Cleaned" +msg_ok "Cleaned