From 9a66c7f2b825ad59d2cbfd474b871f6096f6dae9 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Date: Tue, 14 Mar 2017 15:05:44 +0000 Subject: [PATCH] Use env for plugin dir --- run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 08d3ba7..f165ada 100755 --- a/run.sh +++ b/run.sh @@ -1,13 +1,16 @@ #!/bin/bash + +source /etc/sysconfig/grafana-server + if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then OLDIFS=$IFS IFS=',' for plugin in ${GF_INSTALL_PLUGINS}; do - grafana-cli --pluginsDir /usr/share/grafana/data/plugins plugins install ${plugin} + grafana-cli --pluginsDir ${PLUGINS_DIR} plugins install ${plugin} done IFS=$OLDIFS fi -source /etc/sysconfig/grafana-server + cd /usr/share/grafana /usr/sbin/grafana-server \ --config=${CONF_FILE} \