summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-09-10 06:22:15 +0300
committerValentin Bartenev <vbart@nginx.com>2017-09-10 06:22:15 +0300
commit4953e5b5cba166bc12a92c686c5e000aaf272667 (patch)
treeb6ab5642b8b4709c8f5c0102bc9610066432eedf /auto
parent72c3e08158107398bdeb95fe993fe30999b78ebd (diff)
downloadunit-4953e5b5cba166bc12a92c686c5e000aaf272667.tar.gz
unit-4953e5b5cba166bc12a92c686c5e000aaf272667.tar.bz2
Configuration persistence.
Now configuration survives server reloads.
Diffstat (limited to '')
-rw-r--r--auto/help1
-rw-r--r--auto/options6
-rw-r--r--auto/summary1
3 files changed, 8 insertions, 0 deletions
diff --git a/auto/help b/auto/help
index 1a1ae4cd..e768a228 100644
--- a/auto/help
+++ b/auto/help
@@ -17,6 +17,7 @@ cat << END
--sbindir=DIRECTORY set system admin executables directory name
default: "$NXT_SBINDIR"
--modules=DIRECTORY set modules directory name, default: "$NXT_MODULES"
+ --state=DIRECTORY set state directory name, default: "$NXT_STATE"
--pid=FILE set pid filename, default: "$NXT_PID"
--log=FILE set log filename, default: "$NXT_LOG"
diff --git a/auto/options b/auto/options
index cb4a8b56..9563bbc8 100644
--- a/auto/options
+++ b/auto/options
@@ -55,6 +55,7 @@ do
--bindir=*) NXT_BINDIR="$value" ;;
--sbindir=*) NXT_SBINDIR="$value" ;;
--modules=*) NXT_MODULES="$value" ;;
+ --state=*) NXT_STATE="$value" ;;
--pid=*) NXT_PID="$value" ;;
--log=*) NXT_LOG="$value" ;;
@@ -132,6 +133,11 @@ case "$NXT_MODULES" in
*) NXT_MODULES="$NXT_PREFIX$NXT_MODULES" ;;
esac
+case "$NXT_STATE" in
+ /*) ;;
+ *) NXT_STATE="$NXT_PREFIX$NXT_STATE" ;;
+esac
+
case "$NXT_PID" in
/*) ;;
*) NXT_PID="$NXT_PREFIX$NXT_PID" ;;
diff --git a/auto/summary b/auto/summary
index 93324869..a45855d6 100644
--- a/auto/summary
+++ b/auto/summary
@@ -10,6 +10,7 @@ Configuration summary:
unit pid file: "$NXT_PID"
unit log file: "$NXT_LOG"
unit modules path: "$NXT_MODULES"
+ unit state path: "$NXT_STATE"
unit control API socket: "$NXT_CONTROL"