ZSH doesn't support writing to UID

This commit is contained in:
Oleksii Shevchuk 2017-01-05 23:48:40 +02:00
parent 767eeb82c7
commit cfbdc87758
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh
UID=`id -u`
if [ -z "$UID" ]; then
UID=`id -u`
fi
if [ ! $UID -eq 0 ]; then
echo "[!] You need to be root to run this script"