mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
fix(vps-addswap): updates root check
- removed current use of EUID and UID in favour of id Closes: #482
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user