Build: don't remove grafana-server and grafana-cli binaries from deb and rpm packages (#59890)

* don't remove grafana-server and grafana-cli binaries from /usr/share/grafana/bin in deb and rpm packages

* don't add config overrides in /usr/sbin/grafana-server
This commit is contained in:
Dan Cech
2022-12-06 10:36:43 -05:00
committed by GitHub
parent f1fb202284
commit 1dbc22d18b
2 changed files with 1 additions and 35 deletions

View File

@ -5,18 +5,8 @@
# the system-wide Grafana configuration that was bundled with the package as we
# use the binary.
DEFAULT=/etc/default/grafana
GRAFANA_HOME="${GRAFANA_HOME:-/usr/share/grafana}"
CONF_DIR=/etc/grafana
DATA_DIR=/var/lib/grafana
PLUGINS_DIR=/var/lib/grafana/plugins
LOG_DIR=/var/log/grafana
CONF_FILE=$CONF_DIR/grafana.ini
PROVISIONING_CFG_DIR=$CONF_DIR/provisioning
EXECUTABLE="$GRAFANA_HOME/bin/grafana"
if [ ! -x $EXECUTABLE ]; then
@ -24,18 +14,6 @@ if [ ! -x $EXECUTABLE ]; then
exit 5
fi
# overwrite settings from default file
if [ -f "$DEFAULT" ]; then
. "$DEFAULT"
fi
OPTS="--homepath=${GRAFANA_HOME} \
--config=${CONF_FILE} \
--configOverrides='cfg:default.paths.provisioning=$PROVISIONING_CFG_DIR \
cfg:default.paths.data=${DATA_DIR} \
cfg:default.paths.logs=${LOG_DIR} \
cfg:default.paths.plugins=${PLUGINS_DIR}'"
CMD=server
eval $EXECUTABLE "$CMD" "$OPTS" "$@"
eval $EXECUTABLE "$CMD" "$@"