From dd505ac58743f26ccbf6a90f7843cac32627f223 Mon Sep 17 00:00:00 2001 From: Luke Bigum Date: Tue, 7 Nov 2017 17:52:45 +0000 Subject: [PATCH] source a /etc/defaults script so you can specify extra chronograf options at service start --- CHANGELOG.md | 2 ++ etc/scripts/chronograf.service | 2 +- etc/scripts/init.sh | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 724bb3c243..61bfde3548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ 1. [#1077](https://github.com/influxdata/chronograf/pull/2087): Fix Chronograf requiring Telegraf's CPU and system plugins to ensure that all Apps appear on the HOST LIST page. 1. [#2222](https://github.com/influxdata/chronograf/pull/2222): Fix template variables in dashboard query building. 1. [#2291](https://github.com/influxdata/chronograf/pull/2291): Fix several kapacitor alert creation panics. +1. [#2292](https://github.com/influxdata/chronograf/pull/2292): Source extra command line options from defaults file + ### Features ### UI Improvements diff --git a/etc/scripts/chronograf.service b/etc/scripts/chronograf.service index dd84b1f2b4..ba5c973b1d 100644 --- a/etc/scripts/chronograf.service +++ b/etc/scripts/chronograf.service @@ -9,7 +9,7 @@ After=network-online.target User=chronograf Group=chronograf EnvironmentFile=-/etc/default/chronograf -ExecStart=/usr/bin/chronograf --host 0.0.0.0 --port 8888 -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned +ExecStart=/usr/bin/chronograf --host 0.0.0.0 --port 8888 -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned $CHRONOGRAF_OPTS KillMode=control-group Restart=on-failure diff --git a/etc/scripts/init.sh b/etc/scripts/init.sh index 9898a9e51e..739a3d93c1 100755 --- a/etc/scripts/init.sh +++ b/etc/scripts/init.sh @@ -13,7 +13,8 @@ # Script to execute when starting SCRIPT="/usr/bin/chronograf" # Options to pass to the script on startup -SCRIPT_OPTS="--host 0.0.0.0 --port 8888 -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned" +. /etc/default/chronograf +SCRIPT_OPTS="--host 0.0.0.0 --port 8888 -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned ${CHRONOGRAF_OPTS}" # User to run the process under RUNAS=chronograf