Update core.func
This commit is contained in:
parent
9e85cfd09d
commit
1709063dfc
@ -124,78 +124,3 @@ msg_error() {
|
|||||||
local msg="$1"
|
local msg="$1"
|
||||||
printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2
|
printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
# shell_check() {
|
|
||||||
# if [[ "$(basename "$SHELL")" != "bash" ]]; then
|
|
||||||
# clear
|
|
||||||
# msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell."
|
|
||||||
# echo -e "\nExiting..."
|
|
||||||
# sleep 2
|
|
||||||
# exit
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# root_check() {
|
|
||||||
# if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
|
||||||
# clear
|
|
||||||
# msg_error "Please run this script as root."
|
|
||||||
# echo -e "\nExiting..."
|
|
||||||
# sleep 2
|
|
||||||
# exit
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# pve_check() {
|
|
||||||
# if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then
|
|
||||||
# msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
|
||||||
# echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
|
||||||
# echo -e "Exiting..."
|
|
||||||
# sleep 2
|
|
||||||
# exit
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# arch_check() {
|
|
||||||
# if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
|
||||||
# echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
|
|
||||||
# echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
|
||||||
# echo -e "Exiting..."
|
|
||||||
# sleep 2
|
|
||||||
# exit
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# ssh_check() {
|
|
||||||
# if command -v pveversion >/dev/null 2>&1; then
|
|
||||||
# if [ -n "${SSH_CLIENT:+x}" ]; then
|
|
||||||
# if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
|
||||||
# echo "you've been warned"
|
|
||||||
# else
|
|
||||||
# clear
|
|
||||||
# exit
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# exit-script() {
|
|
||||||
# clear
|
|
||||||
# echo -e "\n${CROSS}${RD}User exited script${CL}\n"
|
|
||||||
# exit
|
|
||||||
# }
|
|
||||||
|
|
||||||
# set_std_mode() {
|
|
||||||
# if [ "$VERB" = "yes" ]; then
|
|
||||||
# STD=""
|
|
||||||
# else
|
|
||||||
# STD="silent"
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# silent() {
|
|
||||||
# if [ "$VERB" = "no" ]; then
|
|
||||||
# "$@" >>"$LOGFILE" 2>&1
|
|
||||||
# else
|
|
||||||
# "$@" 2>&1 | tee -a "$LOGFILE"
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user