Replace root check with UID 0 #233
Patrick010
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
All your scripts check explicitly for the root user. I dont have root, but an administrator account with UID 0. This makes the script fail.
Replace the root check with a check for user with UID 0
Replace the block:
if [[ $( whoami ) != "root" ]]; thenwith:
if [[ $(id -u) -ne 0 ]]; thenThis will allow any UID 0 account to run the script.
Beta Was this translation helpful? Give feedback.
All reactions