fix(vps-addswap): updates root check

- removed current use of EUID and UID in favour of id

Closes: #482
This commit is contained in:
thebatman1
2022-08-16 10:33:53 +05:30
committed by AJ ONeal
parent d65eb457f9
commit 6051f6ab72

View File

@@ -7,7 +7,7 @@ __init_vps_addswap() {
default_size=2G
my_size=${1:-$default_size}
if [ "0" != "$EUID" ] && [ "0" != "$UID" ]; then
if [ $(id -u) -ne 0 ]; then
echo Usage:
echo ' sudo env PATH="$PATH" vps-addswap' $my_size
exit 1