feat: implement nginx:start and nginx:stop commands

This commit is contained in:
Jose Diaz-Gonzalez
2022-08-10 04:13:41 -04:00
parent b605de522c
commit 98feb988fa
6 changed files with 57 additions and 6 deletions

View File

@@ -107,6 +107,24 @@ cmd-nginx-show-config() {
cat "$DOKKU_ROOT/$APP/nginx.conf"
}
cmd-nginx-stop() {
declare desc="stops the nginx server"
declare cmd="nginx:stop"
[[ "$1" == "$cmd" ]] && shift 1
touch "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.stopped"
fn-nginx-vhosts-nginx-init-cmd "stop"
}
cmd-nginx-start() {
declare desc="starts the nginx server"
declare cmd="nginx:start"
[[ "$1" == "$cmd" ]] && shift 1
rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.stopped"
fn-nginx-vhosts-nginx-init-cmd "start"
}
cmd-nginx-validate-config() {
declare desc="validates and optionally cleans up invalid nginx configurations"
declare cmd="nginx:validate-config"