From ce2a3470f453425598c2f14b94aa2b132943c87c Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 17 Sep 2021 11:48:51 -0700 Subject: [PATCH] removed shift --- bin/vhost-add.sh | 2 -- bin/vhost-del.sh | 1 - bin/vhost-deploy.sh | 1 - bin/vhost-destroy.sh | 1 - bin/vhost-disable.sh | 1 - bin/vhost-enable.sh | 2 -- bin/vhost-mysql-db-add.sh | 1 - bin/vhost-mysql-db-del.sh | 1 - bin/vhost-user-add.sh | 1 - bin/vhost-user-del.sh | 1 - bin/vhost-user-jail-reset.sh | 1 - bin/vhost-user-jail.sh | 1 - bin/vhost-user-jails-cp.sh | 1 - bin/vhost-varnish-disable.sh | 1 - bin/vhost-varnish-enable.sh | 1 - 15 files changed, 17 deletions(-) diff --git a/bin/vhost-add.sh b/bin/vhost-add.sh index b575139..0a57c72 100755 --- a/bin/vhost-add.sh +++ b/bin/vhost-add.sh @@ -28,7 +28,6 @@ if [ -n "$1" ]; then # virtualhost if vhost::validate_domain $1; then virtualhost="${1,,}" - shift else echo "ERROR: $1 is not a valid domain name." exit 1 @@ -39,7 +38,6 @@ if [ -n "$1" ]; then help else username="${2,,}" - shift fi else echo "username not set" diff --git a/bin/vhost-del.sh b/bin/vhost-del.sh index 57070c1..3268bff 100755 --- a/bin/vhost-del.sh +++ b/bin/vhost-del.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else help diff --git a/bin/vhost-deploy.sh b/bin/vhost-deploy.sh index 41135f5..479a937 100755 --- a/bin/vhost-deploy.sh +++ b/bin/vhost-deploy.sh @@ -27,7 +27,6 @@ if [ -n "$1" ]; then help elif vhost::validate_domain $1; then virtualhost="${1,,}" - shift else echo "ERROR: Invalid virtualhost: $1" exit 1 diff --git a/bin/vhost-destroy.sh b/bin/vhost-destroy.sh index 04766bf..f3921b3 100755 --- a/bin/vhost-destroy.sh +++ b/bin/vhost-destroy.sh @@ -27,7 +27,6 @@ if [ -n "$1" ]; then exit 1 else virtualhost="${1,,}" - shift fi else help diff --git a/bin/vhost-disable.sh b/bin/vhost-disable.sh index 6c59240..d165187 100755 --- a/bin/vhost-disable.sh +++ b/bin/vhost-disable.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else echo "virtualhost not set" diff --git a/bin/vhost-enable.sh b/bin/vhost-enable.sh index 63f348d..62c9b14 100755 --- a/bin/vhost-enable.sh +++ b/bin/vhost-enable.sh @@ -66,7 +66,6 @@ if [ -n "$1" ]; then else # check for and set macro macro_name=$1 - shift if [[ " ${macro_array[@]} " =~ " ${macro_name} " ]]; then macro_vhost_line="$macro_vhost_line $macro_name" else @@ -76,7 +75,6 @@ if [ -n "$1" ]; then # check for and set vhost if [ -n "$2" ]; then vhost=$2 - shift macro_vhost_line="$macro_vhost_line $vhost" vhost_conf="$vhost.conf" else diff --git a/bin/vhost-mysql-db-add.sh b/bin/vhost-mysql-db-add.sh index 955cc51..a4a93d8 100755 --- a/bin/vhost-mysql-db-add.sh +++ b/bin/vhost-mysql-db-add.sh @@ -34,7 +34,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else echo "virtualhost not set" diff --git a/bin/vhost-mysql-db-del.sh b/bin/vhost-mysql-db-del.sh index 2e91fee..b33866b 100755 --- a/bin/vhost-mysql-db-del.sh +++ b/bin/vhost-mysql-db-del.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else echo "virtualhost not set" diff --git a/bin/vhost-user-add.sh b/bin/vhost-user-add.sh index 53707db..1e31d7a 100755 --- a/bin/vhost-user-add.sh +++ b/bin/vhost-user-add.sh @@ -26,7 +26,6 @@ if [ -n "$1" ]; then help else username="${1,,}" - shift fi else echo "username not set" diff --git a/bin/vhost-user-del.sh b/bin/vhost-user-del.sh index 766bb4e..fd14810 100755 --- a/bin/vhost-user-del.sh +++ b/bin/vhost-user-del.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else username="${1,,}" - shift fi else echo "username not set" diff --git a/bin/vhost-user-jail-reset.sh b/bin/vhost-user-jail-reset.sh index 5c10695..5abe4ae 100755 --- a/bin/vhost-user-jail-reset.sh +++ b/bin/vhost-user-jail-reset.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else username="${1,,}" - shift fi else echo "username not set" diff --git a/bin/vhost-user-jail.sh b/bin/vhost-user-jail.sh index eb4a1d2..a4d4f1d 100755 --- a/bin/vhost-user-jail.sh +++ b/bin/vhost-user-jail.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else username="${1,,}" - shift fi else echo "username not set" diff --git a/bin/vhost-user-jails-cp.sh b/bin/vhost-user-jails-cp.sh index b908dff..7837760 100755 --- a/bin/vhost-user-jails-cp.sh +++ b/bin/vhost-user-jails-cp.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then help else cpfile=$1 - shift fi else echo "file to copy in to jails not set" diff --git a/bin/vhost-varnish-disable.sh b/bin/vhost-varnish-disable.sh index 8d80092..1e53786 100755 --- a/bin/vhost-varnish-disable.sh +++ b/bin/vhost-varnish-disable.sh @@ -27,7 +27,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else echo "virtualhost not set" diff --git a/bin/vhost-varnish-enable.sh b/bin/vhost-varnish-enable.sh index d956863..3a8d6a8 100755 --- a/bin/vhost-varnish-enable.sh +++ b/bin/vhost-varnish-enable.sh @@ -28,7 +28,6 @@ if [ -n "$1" ]; then help else virtualhost="${1,,}" - shift fi else echo "virtualhost not set"