Преглед изворни кода

startup/openrc-init.in: supply a default value for NRPE_CFG.

The OpenRC init script requires the NRPE_CFG variable to be set. The
startup/openrc-conf.in file sets it, but that file is not installed as
part of the usual "make install-init" process. To ensure that the init
script works out of the box, this commit sets a default value for
NRPE_CFG directly in the init script.

Closes: https://github.com/NagiosEnterprises/nrpe/issues/165
Michael Orlitzky пре 8 година
родитељ
комит
e5de53ebfc
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      startup/openrc-init.in

+ 4 - 0
startup/openrc-init.in

@@ -3,6 +3,10 @@
 # Copyright (c) 2017 Nagios(R) Core(TM) Development Team
 #
 
+# Supply a default value for NRPE_CFG in case the corresponding
+# conf.d file is not installed.
+: ${NRPE_CFG:="@sysconfdir@/nrpe.cfg"}
+
 command="@sbindir@/nrpe"
 command_args="--config=${NRPE_CFG} ${NRPE_OPTS}"
 command_args_background="--daemon"