mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-19 12:56:01 +00:00
Compare commits
3 Commits
4689cbc5e5
...
885f5a9a2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
885f5a9a2b | ||
|
|
682a08e970 | ||
|
|
e0e81a022d |
@@ -52,6 +52,17 @@ msg_error() {
|
||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
# Run as root only
|
||||
check_root() {
|
||||
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
|
||||
}
|
||||
|
||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||
pve_check() {
|
||||
if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
|
||||
@@ -419,6 +430,7 @@ advanced_settings() {
|
||||
}
|
||||
|
||||
install_script() {
|
||||
check_root
|
||||
ssh_check
|
||||
arch_check
|
||||
pve_check
|
||||
|
||||
Reference in New Issue
Block a user