more style/function tweaks
This commit is contained in:
committed by
Michael Hobbs
parent
89f289b433
commit
aa2415eeb8
@@ -47,9 +47,9 @@ nginx_logs() {
|
||||
local NGINX_LOGS_PATH="/var/log/nginx/$APP-$NGINX_LOGS_TYPE.log"
|
||||
|
||||
if [[ $3 == "-t" ]]; then
|
||||
NGINX_LOGS_ARGS="-F"
|
||||
local NGINX_LOGS_ARGS="-F"
|
||||
else
|
||||
NGINX_LOGS_ARGS="-n 20"
|
||||
local NGINX_LOGS_ARGS="-n 20"
|
||||
fi
|
||||
|
||||
tail "$NGINX_LOGS_ARGS" "$NGINX_LOGS_PATH"
|
||||
|
||||
@@ -6,6 +6,8 @@ source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
nginx_post_deploy() {
|
||||
local desc="nginx-vhosts post-deploy plugin trigger"
|
||||
local trigger="nginx_post_deploy"
|
||||
local APP="$1"
|
||||
if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then
|
||||
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]]; then
|
||||
|
||||
@@ -4,6 +4,12 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
if [[ "$(get_app_proxy_type "$1")" == "nginx" ]]; then
|
||||
nginx_build_config "$1"
|
||||
fi
|
||||
nginx_post_domains_update() {
|
||||
local desc="calls nginx build_config when domains are updated"
|
||||
local trigger="nginx_post_domains_update"
|
||||
if [[ "$(get_app_proxy_type "$1")" == "nginx" ]]; then
|
||||
nginx_build_config "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_post_domains_update "$@"
|
||||
|
||||
@@ -4,8 +4,9 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
nginx_disable() {
|
||||
nginx_proxy_disable() {
|
||||
local desc="disable nginx proxy"
|
||||
local trigger="nginx_proxy_disable"
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
|
||||
if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then
|
||||
@@ -14,4 +15,4 @@ nginx_disable() {
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_disable "$@"
|
||||
nginx_proxy_disable "$@"
|
||||
|
||||
@@ -4,8 +4,9 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
nginx_enable() {
|
||||
nginx_proxy_enable() {
|
||||
local desc="enable nginx proxy"
|
||||
local trigger="nginx_proxy_enable"
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
|
||||
if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then
|
||||
@@ -14,4 +15,4 @@ nginx_enable() {
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_enable "$@"
|
||||
nginx_proxy_enable "$@"
|
||||
|
||||
Reference in New Issue
Block a user