Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (21 sloc) 696 Bytes
#!/bin/sh
# Enable a project (project)
# This moves /etc/nginx/projects/X.conf.disabled to X.conf
true ${project:="${extension_args[0]:-$1}"}
if variable is empty project
then
log fail "project must be specified for 'nginx project'"
fi
if files exist "${service_config_path}/servers/$project.conf.disabled"
then
file move \
from "${service_config_path}/servers/$project.conf.disabled" \
to "${service_config_path}/servers/$project.conf"
else
if ! files exist "${service_config_path}/servers/$project.conf"
then
fail "Cannot enable '$project'"\
"as ${service_config_path}/servers/$project.conf.disabled does not exist."
fi
succeed "$project.conf is enabled."
fi