소스 검색

Update build.func

tteckster 1 년 전
부모
커밋
885f5a9a2b
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      misc/build.func

+ 7 - 7
misc/build.func

@@ -54,13 +54,13 @@ msg_error() {
 
 # 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
+  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.