diff options
author | awy <awy@tutamail.com> | 2024-08-26 02:36:04 +0300 |
---|---|---|
committer | awy <awy@tutamail.com> | 2024-08-26 02:36:04 +0300 |
commit | 01b0a486d1190b88ee40458b4e16bcd6fa0c93bc (patch) | |
tree | a4c9283bd05cd3aa776fa0263181a71daeab1539 | |
parent | a34521a27cebeb5a76a73e7f7380ee65e9ffc3b3 (diff) |
posix compliant root check
-rwxr-xr-x | rice.sh | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,7 +1,9 @@ +#!/bin/sh + WORKDIRECTORY=$PWD PERMUSER="awy" -if [ "$EUID" -ne 0 ] +if [ "$(id -u)" -ne 0 ] then printf "The script has to be run as root.\n" exit fi |