From e3c19dc3dd1e4e21cbf1538c82d5cd1b40c2d78e Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sat, 4 Feb 2017 12:14:49 +0000 Subject: [PATCH] Update rtinst.sh --- rtinst.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rtinst.sh b/rtinst.sh index 1889d33..0e6a6ce 100644 --- a/rtinst.sh +++ b/rtinst.sh @@ -214,7 +214,7 @@ if which rtorrent; then fi # set and prepare user -if test "$SUDO_USER" = "root" || { test -z "$SUDO_USER" && test "$LOGNAME" = "root"; }; then +if [ -z "$SUDO_USER" ]; then echo "Enter the name of the user to install to" echo "This will be your primary user" echo "It can be an existing user or a new user" @@ -239,11 +239,8 @@ if test "$SUDO_USER" = "root" || { test -z "$SUDO_USER" && test "$LOGNAME" = "r adduser --gecos "" $user fi -elif ! [ -z "$SUDO_USER" ]; then - user=$SUDO_USER else - echo "Script must be run using sudo or root" - exit 1 + user=$SUDO_USER fi home=$(eval echo "~$user")