Skip to content

Commit

Permalink
Several minor patches
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Aug 20, 2018
1 parent 5b2ee47 commit c7ac52b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions info.sh
Expand Up @@ -114,9 +114,11 @@ fi
elif [[ $COMMAND == "username" ]]; then
# Get NEMS username
# From nems.conf
username=''
username='nemsadmin'
if [[ -f /usr/local/share/nems/nems.conf ]]; then
username=`cat /usr/local/share/nems/nems.conf | grep username | printf '%s' $(cut -n -d '=' -f 2)`
if grep -q "username" /usr/local/share/nems/nems.conf; then
username=`cat /usr/local/share/nems/nems.conf | grep username | printf '%s' $(cut -n -d '=' -f 2)`
fi
fi
# Legacy support: from htpasswd
if [[ $username == "" ]]; then
Expand Down

0 comments on commit c7ac52b

Please sign in to comment.