From f960664c4241f95463dc37ddbf5ded31045bea77 Mon Sep 17 00:00:00 2001 From: Alec Muffett Date: Sat, 11 Feb 2017 20:29:48 +0000 Subject: [PATCH] commit: nxreload --- eotk | 6 +++++- lib.d/do-configure.pl | 2 +- templates.d/nxreload.sh.txt | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 templates.d/nxreload.sh.txt diff --git a/eotk b/eotk index c720001..d7189fe 100755 --- a/eotk +++ b/eotk @@ -77,7 +77,7 @@ Configure() { if [ -s $file2 ] ; then echo $prog: $file: using existing $file2 else - echo $prog: $file: populating $file2 with onions + echo $prog: $file: populating $file2 with onions, please be very patient... Populate $file > $file2 fi file="$file2" @@ -131,6 +131,10 @@ case "$cmd" in Action bounce "$@" ;; + nxreload) # project, or "-a" + Action nxreload "$@" + ;; + debugon) # project, or "-a" Action debugon "$@" ;; diff --git a/lib.d/do-configure.pl b/lib.d/do-configure.pl index 316a85a..8472315 100755 --- a/lib.d/do-configure.pl +++ b/lib.d/do-configure.pl @@ -336,7 +336,7 @@ sub DoProject { &SetEnv("header_hpkp_suppress", 1); &SetEnv("header_hsts_suppress", 1); -&SetEnv("SCRIPT_NAMES", "bounce.sh debugoff.sh debugon.sh harvest.sh maps.sh start.sh status.sh stop.sh syntax.sh"); +&SetEnv("SCRIPT_NAMES", "bounce.sh debugoff.sh debugon.sh harvest.sh maps.sh nxreload.sh start.sh status.sh stop.sh syntax.sh"); &SetEnv("SCRIPT_PAUSE", 5); # dynamic settings: overridable / may be given a global setting diff --git a/templates.d/nxreload.sh.txt b/templates.d/nxreload.sh.txt new file mode 100644 index 0000000..73ebfa8 --- /dev/null +++ b/templates.d/nxreload.sh.txt @@ -0,0 +1,8 @@ +#!/bin/sh +# eotk (c) 2017 Alec Muffett +cd %PROJECT_DIR% || exit 1 + +nginxconf=%PROJECT_DIR%/nginx.conf +test -f $nginxconf && nginx -c $nginxconf -s reload + +exit 0