use declare for description variable
This commit is contained in:
@@ -7,7 +7,7 @@ source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
validate_nginx() {
|
||||
local desc="validate entire nginx config"
|
||||
declare desc="validate entire nginx config"
|
||||
set +e
|
||||
sudo /usr/sbin/nginx -t > /dev/null 2>&1
|
||||
local exit_code=$?
|
||||
@@ -19,7 +19,7 @@ validate_nginx() {
|
||||
}
|
||||
|
||||
restart_nginx() {
|
||||
local desc="restart nginx for given distros"
|
||||
declare desc="restart nginx for given distros"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
sudo /usr/sbin/invoke-rc.d nginx reload > /dev/null
|
||||
@@ -40,7 +40,7 @@ restart_nginx() {
|
||||
}
|
||||
|
||||
nginx_logs() {
|
||||
local desc="display app nginx logs"
|
||||
declare desc="display app nginx logs"
|
||||
local APP="$2"; verify_app_name "$APP"
|
||||
local NGINX_LOGS_TYPE=${1#nginx:}
|
||||
local NGINX_LOGS_TYPE=${NGINX_LOGS_TYPE%-logs}
|
||||
@@ -56,7 +56,7 @@ nginx_logs() {
|
||||
}
|
||||
|
||||
configure_nginx_ports() {
|
||||
local desc="configure nginx listening ports"
|
||||
declare desc="configure nginx listening ports"
|
||||
local APP=$1; verify_app_name "$APP"
|
||||
local RAW_TCP_PORTS="$(get_app_raw_tcp_ports "$APP")"
|
||||
local DOKKU_NGINX_PORT=$(config_get "$APP" DOKKU_NGINX_PORT)
|
||||
@@ -89,7 +89,7 @@ configure_nginx_ports() {
|
||||
}
|
||||
|
||||
validate_ssl_domains() {
|
||||
local desc="check configured domains against SSL cert contents and show warning if mismatched"
|
||||
declare desc="check configured domains against SSL cert contents and show warning if mismatched"
|
||||
local APP=$1; verify_app_name "$APP"
|
||||
local SSL_HOSTNAME=$(get_ssl_hostnames "$APP")
|
||||
local SSL_HOSTNAME_REGEX=$(echo "$SSL_HOSTNAME" | xargs | sed 's|\.|\\.|g' | sed 's/\*/\[^\.\]\*/g' | sed 's/ /|/g')
|
||||
@@ -110,7 +110,7 @@ validate_ssl_domains() {
|
||||
}
|
||||
|
||||
get_custom_nginx_template() {
|
||||
local desc="attempts to copy custom nginx template from app image"
|
||||
declare desc="attempts to copy custom nginx template from app image"
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
local DESTINATION="$2"
|
||||
local IMAGE_TAG="$(get_running_image_tag "$APP")"
|
||||
@@ -121,7 +121,7 @@ get_custom_nginx_template() {
|
||||
}
|
||||
|
||||
nginx_build_config() {
|
||||
local desc="build nginx config to proxy app containers using sigil"
|
||||
declare desc="build nginx config to proxy app containers using sigil"
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
local DOKKU_APP_LISTEN_PORT="$2"; local DOKKU_APP_LISTEN_IP="$3"
|
||||
local VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"; local URLS_PATH="$DOKKU_ROOT/$APP/URLS"
|
||||
|
||||
Reference in New Issue
Block a user