Require root to run install.sh

This commit is contained in:
Rezart Qelibari
2022-02-14 14:01:39 +01:00
parent 713d994ff1
commit 2b87c97692
2 changed files with 3 additions and 1 deletions

View File

@@ -256,6 +256,7 @@ function isPlistBuddyInstalled() {
function checkPrerequisites() {
isMacOS || { lop error 'This setup is only for macOS 10.13 and up.'; return 10 }
isPlistBuddyInstalled || { lop error 'This setup requires PlistBuddy to be either at /usr/libexec or in any of the PATH directories.'; return 11 }
test "`id -u`" -eq 0 || { lop error 'This module requires root access. Please run as root.'; return 11 }
}
function main() {