Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Declare variables before use.

  • Loading branch information...
commit d9100350fd6e09b56406289d223a6964497c21c9 1 parent 3ce28eb
Wayne E. Seguin wayneeseguin authored
Showing with 15 additions and 7 deletions.
  1. +5 −2 nginx/bin/server/new
  2. +10 −5 nginx/shell/functions
7 nginx/bin/server/new
View
@@ -3,6 +3,9 @@
trace_filter nginx || set -o xtrace
local domain="${project}"
+typeset -g project_config domain
+typeset -ga domains
+
if ! template exists "nginx/server.conf"
then
fail "$FUNCNAME: $extension_templates_path/server.conf template is missing."
@@ -34,11 +37,11 @@ then
domains=("${domain}" "*.${domain}")
fi
-
if ! files exist "${project_config}"
then
templates install "nginx/server.conf" \
- to "${project_config}" with \
+ to "${project_config}" \
+ with \
modules_path "${modules_path}" \
service "${service}" \
project "${project}" \
15 nginx/shell/functions
View
@@ -181,12 +181,16 @@ nginx_postinstall()
nginx_postactivate()
{
trace_filter nginx || set -o xtrace
- user is root || return 0
+
+ if user is not root
+ then
+ return 0
+ fi
if (( ${force_flag:=0} )) &&
- paths exists "${service_config_path}"
+ path exists "${service_config_path}"
then
- paths move \
+ path move \
from "${service_config_path}" \
to "${service_config_path}.${timestamp}"
fi
@@ -199,7 +203,7 @@ nginx_postactivate()
from "${install_path}/etc/nginx" \
to "${service_config_path}"
- paths enter "${service_config_path}"
+ path enter "${service_config_path}"
files remove "${nginx_files[@]}"
fi
@@ -253,7 +257,8 @@ nginx_service_setup()
with "# No user line for non-root installs" \
in "${install_path}/etc/nginx/nginx.conf"
- paths chown "${service_user}" recursive "${nginx_dirs[@]}" "etc/nginx"
+ paths chown "${service_user}" recursively \
+ "${nginx_dirs[@]}" "etc/nginx"
}
nginx_os_dependencies_install()
Please sign in to comment.
Something went wrong with that request. Please try again.