diff options
author | Jakob Stendahl <jakob.stendahl@outlook.com> | 2018-10-18 20:32:36 +0200 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2018-10-18 20:32:36 +0200 |
commit | a74ee07f77d6434b907d8e560c65468ea04336e6 (patch) | |
tree | b627dfb831b9ff797165392fc917fe0fbca937a8 /bin/install.sh | |
parent | 0c0561b98528d01faf0d7d6ab5a9324609284aaf (diff) | |
download | Luxcena-Neo-a74ee07f77d6434b907d8e560c65468ea04336e6.tar.gz Luxcena-Neo-a74ee07f77d6434b907d8e560c65468ea04336e6.zip |
:construction: Fix error message on adduser error
Diffstat (limited to 'bin/install.sh')
-rwxr-xr-x | bin/install.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/install.sh b/bin/install.sh index 08f160b..ae45052 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -84,17 +84,14 @@ if [ $? -eq 0 ]; then echo "User already exists, continuing..." else #pass=$(perl -e 'print crypt($ARGV[0], "password")' $password) - sudo useradd -m $username - [ $? -eq 0 ] && echo "User has been added to system!" || { printf "\n\nInstall failed.\n"; exit 1; } + sudo useradd -m $username || { printf "\n\nInstall failed.\n"; exit 1; } fi - -userDir=$(eval echo "~$username") - # First we make our directories tput setaf 8 printf '%s\n' " - Making app-dir (/bin/luxcena-neo)..." tput sgr0 +userDir=$(eval echo "~$username") sudo mkdir -p "$userDir/install" || { printf "\n\nInstall failed.\n"; exit 1; } sudo chown $username:$username "$userDir/install" sudo mkdir -p "$userDir/install/src" || { printf "\n\nInstall failed.\n"; exit 1; } |