mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
update pve & arch checks (#1044)
* update ARCH_CHECK & PVE_CHECK * header_info * PVE 7 required
This commit is contained in:
parent
06831d6128
commit
0ddf5e2101
82 changed files with 1146 additions and 1148 deletions
|
@ -6,7 +6,9 @@
|
|||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
cat <<"EOF"
|
||||
clear
|
||||
cat <<"EOF"
|
||||
|
||||
_ __ _ ____ __ ___
|
||||
/ | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____
|
||||
/ |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/
|
||||
|
@ -16,7 +18,6 @@ function header_info {
|
|||
|
||||
EOF
|
||||
}
|
||||
clear
|
||||
header_info
|
||||
echo -e "Loading..."
|
||||
APP="Nginx Proxy Manager"
|
||||
|
@ -65,18 +66,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
|
||||
|
@ -339,7 +339,6 @@ function install_script() {
|
|||
}
|
||||
|
||||
function update_script() {
|
||||
clear
|
||||
header_info
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
grep "tag_name" |
|
||||
|
@ -456,8 +455,9 @@ msg_ok "Cleaned"
|
|||
msg_ok "Update Successfull"
|
||||
exit
|
||||
}
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue