Remove {DAEMON,ICINGA2}_USER and {DAEMON,ICINGA2}_GROUP variables

refs #7370
This commit is contained in:
Gunnar Beutner 2014-10-20 21:41:04 +02:00
parent 6de85912ed
commit 6e17eadf8f
9 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,6 @@ include(GNUInstallDirs)
set(ICINGA2_USER "icinga" CACHE STRING "Icinga 2 user")
set(ICINGA2_GROUP "icinga" CACHE STRING "Icinga 2 group")
set(ICINGA2_COMMAND_USER "icinga" CACHE STRING "Icinga 2 command user")
set(ICINGA2_COMMAND_GROUP "icingacmd" CACHE STRING "Icinga 2 command group")
set(ICINGA2_RUNDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run" CACHE STRING "/run directory")
set(ICINGA2_PLUGINDIR "/usr/lib/nagios/plugins" CACHE STRING "Path for the check plugins")

View File

@ -135,7 +135,6 @@ variables are supported:
- `ICINGA2_USER`: The user Icinga 2 should run as; defaults to `icinga`
- `ICINGA2_GROUP`: The group Icinga 2 should run as; defaults to `icinga`
- `ICINGA2_COMMAND_USER`: The command user Icinga 2 should use; defaults to `icinga`
- `ICINGA2_GIT_VERSION_INFO`: Whether to use Git to determine the version number; defaults to `ON`
- `ICINGA2_COMMAND_GROUP`: The command group Icinga 2 should use; defaults to `icingacmd`
- `ICINGA2_UNITY_BUILD`: Whether to perform a unity build

View File

@ -1,7 +1,5 @@
# default settings for icinga2's initscript
#DAEMON_CONFIG="/etc/icinga2/icinga2.conf"
#DAEMON_USER=nagios
#DAEMON_GROUP=nagios
#DAEMON_CMDGROUP=www-data
#DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"

View File

@ -17,8 +17,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="icinga2 monitoring daemon"
NAME=icinga2
DAEMON=/usr/sbin/icinga2
DAEMON_USER=nagios
DAEMON_GROUP=nagios
DAEMON_CMDGROUP=www-data
DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
STARTUP_LOG="/var/log/icinga2/startup.log"
@ -28,6 +26,9 @@ SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
DAEMON_USER=`$DAEMON variable get --current RunAsUser`
DAEMON_GROUP=`$DAEMON variable get --current RunAsGroup`
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

1
debian/rules vendored
View File

@ -25,7 +25,6 @@ override_dh_auto_configure:
-DICINGA2_RUNDIR=/run \
-DICINGA2_USER=nagios \
-DICINGA2_GROUP=nagios \
-DICINGA2_COMMAND_USER=nagios \
-DICINGA2_COMMAND_GROUP=www-data \
-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \
-DICINGA2_UNITY_BUILD=TRUE

View File

@ -12,6 +12,9 @@ else
exit 1
fi
ICINGA2_USER=`$DAEMON variable get --current RunAsUser`
ICINGA2_GROUP=`$DAEMON variable get --current RunAsGroup`
mkdir -p $(dirname -- $ICINGA2_PID_FILE)
chown $ICINGA2_USER:$ICINGA2_GROUP $(dirname -- $ICINGA2_PID_FILE)
if [ -f $ICINGA2_PID_FILE ]; then

View File

@ -26,6 +26,9 @@ fi
test -x $DAEMON || exit 5
ICINGA2_USER=`$DAEMON variable get --current RunAsUser`
ICINGA2_GROUP=`$DAEMON variable get --current RunAsGroup`
if [ ! -e $ICINGA2_CONFIG_FILE ]; then
echo "Config file '$ICINGA2_CONFIG_FILE' does not exist."
exit 6

View File

@ -8,5 +8,4 @@ ICINGA2_STARTUP_LOG=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/startup.log
ICINGA2_LOG=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/icinga2.log
ICINGA2_USER=@ICINGA2_USER@
ICINGA2_GROUP=@ICINGA2_GROUP@
ICINGA2_COMMAND_USER=@ICINGA2_COMMAND_USER@
ICINGA2_COMMAND_GROUP=@ICINGA2_COMMAND_GROUP@

View File

@ -186,7 +186,6 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
-DICINGA2_RUNDIR=%{_rundir} \
-DICINGA2_USER=%{icinga_user} \
-DICINGA2_GROUP=%{icinga_group} \
-DICINGA2_COMMAND_USER=%{icinga_user} \
-DICINGA2_COMMAND_GROUP=%{icingacmd_group} \
-DICINGA2_UNITY_BUILD=TRUE"
%if "%{_vendor}" == "redhat"