mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-28 19:23:20 +01:00
Update build.func
This commit is contained in:
parent
682a08e970
commit
885f5a9a2b
@ -54,13 +54,13 @@ msg_error() {
|
|||||||
|
|
||||||
# Run as root only
|
# Run as root only
|
||||||
check_root() {
|
check_root() {
|
||||||
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
||||||
clear
|
clear
|
||||||
msg_error "Please run this script as root."
|
msg_error "Please run this script as root."
|
||||||
echo -e "\nExiting..."
|
echo -e "\nExiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||||
|
Loading…
Reference in New Issue
Block a user