From 2574097eb4afdef32d813a1424b8293b91a8ab37 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 15 Nov 2015 13:34:19 +0300 Subject: [PATCH] Use EUID to check root --- openvpn-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index adf7a90..2c90b88 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -8,7 +8,7 @@ # universal as possible. -if [[ "$USER" != 'root' ]]; then +if [[ "$EUID" -ne 0 ]]; then echo "Sorry, you need to run this as root" exit fi