diff --git a/bin/portzap b/bin/portzap index 2d1a116..a715e17 100755 --- a/bin/portzap +++ b/bin/portzap @@ -60,7 +60,6 @@ case $1 in doas -u _portzap "${libexec}"/portzap-erase "${gitdir}" "${installdir}" ;; "install") - require_root require_dependency "git doas" "${libexec}"/portzap-install "${gitdir}" "${installdir}" "${revision}" ;; diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index d39b0fe..a3135c1 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -57,6 +57,10 @@ run_install() ## # main +if [ "$(id -u)" != "0" ]; then + echo "[-] This command must be run as root" + exit 1 +fi set -x umask u=rwX,g=rwX,o= cd "${gitdir}"