diff --git a/bin/vhost-deploy.sh b/bin/vhost-deploy.sh index 9b96aec..370af3d 100755 --- a/bin/vhost-deploy.sh +++ b/bin/vhost-deploy.sh @@ -40,8 +40,8 @@ fi # check for and set username (length between 3 and 12 characters) if [[ -z "$username" ]]; then - strippeddomain=`echo $domain | sed 's|\.||'` - strippeddomain=`echo $strippeddomain | sed 's|-||'` + strippeddomain=`echo $domain | sed 's|\.||g'` + strippeddomain=`echo $strippeddomain | sed 's|-||g'` username=`echo ${strippeddomain:0:8}` if grep -q "^$username:" /etc/passwd; then # username already exists, try another