From 08ef18bc2d2fce6ad40ccbaf029c3246761c46a6 Mon Sep 17 00:00:00 2001 From: Patrick Marchand Date: Wed, 17 Oct 2018 15:03:15 -0400 Subject: [PATCH] Use ${var:+...} instead of [-n ] and "$@" instead of "$*" Fixes issue uncovered by proper use of double quotes. --- scripts/web-add.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/web-add.sh b/scripts/web-add.sh index bc657f1..10444a3 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -248,7 +248,7 @@ create_www_account() { return 1 fi - # Force UID and GID if specified + # Create user and force UID / GID if specified /usr/sbin/adduser \ --gecos "User $in_login" \ --disabled-password \ @@ -269,8 +269,8 @@ create_www_account() { && chmod -R u=rwX,g=,o= "$HOME_DIR_USER/.ssh/authorized_keys" \ && chown -R "$in_login":"$in_login" "$HOME_DIR_USER/.ssh" - if [ "$WEB_SERVER" == "apache" ]; then - # Force UID if specified + if [ "$WEB_SERVER" == "apache" ]; then + # Create www user and force UID if specified /usr/sbin/adduser \ --gecos "WWW $in_login" \ --disabled-password \