|
|
|
@ -6,7 +6,9 @@
|
|
|
|
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
|
|
|
|
|
|
|
|
function header_info {
|
|
|
|
|
cat <<"EOF"
|
|
|
|
|
clear
|
|
|
|
|
cat <<"EOF"
|
|
|
|
|
|
|
|
|
|
_ __ __ ____ __
|
|
|
|
|
/ | / /___ ____/ /__ v5 / __ \___ ____/ /
|
|
|
|
|
/ |/ / __ \/ __ / _ \ / /_/ / _ \/ __ /
|
|
|
|
@ -15,7 +17,6 @@ function header_info {
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
}
|
|
|
|
|
clear
|
|
|
|
|
header_info
|
|
|
|
|
echo -e "Loading..."
|
|
|
|
|
APP="Node-Red"
|
|
|
|
@ -64,18 +65,17 @@ function msg_error() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PVE_CHECK() {
|
|
|
|
|
PVE=$(pveversion | grep "pve-manager/7" | wc -l)
|
|
|
|
|
if [[ $PVE != 1 ]]; then
|
|
|
|
|
echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}"
|
|
|
|
|
echo -e "Exiting..."
|
|
|
|
|
sleep 2
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
|
|
|
|
|
echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported"
|
|
|
|
|
echo -e "Requires PVE Version 7.0 or higher"
|
|
|
|
|
echo -e "Exiting..."
|
|
|
|
|
sleep 2
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
function ARCH_CHECK() {
|
|
|
|
|
ARCH=$(dpkg --print-architecture)
|
|
|
|
|
if [[ "$ARCH" != "amd64" ]]; then
|
|
|
|
|
echo -e "\n ❌ This script will not work with PiMox! \n"
|
|
|
|
|
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
|
|
|
|
echo -e "\n ${CROSS} This script will not work with PiMox! \n"
|
|
|
|
|
echo -e "Exiting..."
|
|
|
|
|
sleep 2
|
|
|
|
|
exit
|
|
|
|
@ -341,7 +341,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb
|
|
|
|
|
"1" "Update ${APP}" ON \
|
|
|
|
|
"2" "Install Themes" OFF \
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
clear
|
|
|
|
|
header_info
|
|
|
|
|
if [ "$UPD" == "1" ]; then
|
|
|
|
|
msg_info "Stopping ${APP}"
|
|
|
|
@ -367,7 +366,6 @@ THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Scri
|
|
|
|
|
"solarized-dark" "" OFF \
|
|
|
|
|
"solarized-light" "" OFF \
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
clear
|
|
|
|
|
header_info
|
|
|
|
|
msg_info "Installing ${THEME} Theme"
|
|
|
|
|
cd /root/.node-red
|
|
|
|
@ -383,8 +381,9 @@ exit
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
ARCH_CHECK
|
|
|
|
|
PVE_CHECK
|
|
|
|
|
header_info
|
|
|
|
|
if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi
|
|
|
|
|
if [ "$VERB" == "yes" ]; then set -x; fi
|
|
|
|
|
if [ "$CT_TYPE" == "1" ]; then
|
|
|
|
|