]> granicus.if.org Git - icinga2/commitdiff
Remove {DAEMON,ICINGA2}_USER and {DAEMON,ICINGA2}_GROUP variables
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 20 Oct 2014 19:41:04 +0000 (21:41 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 20 Oct 2014 19:41:04 +0000 (21:41 +0200)
refs #7370

CMakeLists.txt
INSTALL.md
debian/icinga2-common.icinga2.default
debian/icinga2-common.icinga2.init
debian/rules
etc/initsystem/icinga2-prepare-dirs
etc/initsystem/icinga2.init.d.cmake
etc/initsystem/icinga2.sysconfig.cmake
icinga2.spec

index 10461a03206b88f8140392d990d4b815346015e7..e13d08856f2de6aa645c5b6d9d36e1a0b4f7dab2 100644 (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")
index 871005da218880c3ebde824635a9dca44e6b256e..a3019fe39eaad23f19c4f529c885041206095124 100644 (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
index 6df5df10a015ef2557e4312ba8c85b5d03c002a3..3b709684e0136dc6bb604f8ab68eb6e3f11de348 100644 (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"
index e04ff45974aee2f426e1911a7406af0a67ba0b0f..8d0ef3f763e77f441d84326f632a4cf3844ba30d 100644 (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
 
index acb0b84067c70f53b06bb18751fd5a694df2c3be..b5f99c136c55a150cd6ae4172e5cbe0eeac62663 100755 (executable)
@@ -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
index c9b12491bc9f5805be0347d9f30ccd047da870ee..74daa1b8cd5eef8d7ff1dfe63a648277e1f9cb79 100644 (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
index f13496fc016138a9100b37d3f39b4723d21bdd0f..d9e8ae63f375ae41a527d25d9b3a277ed157d3f0 100644 (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
index 8b65b801753dbbaba8a6feda1f7f10cd685274f3..646347d19c72d88d046cd28fbc66100deb6c48b4 100644 (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@
index c42a42cb6d902f697d64a083a7f7ceaab8288efa..56d172447e649cf6ff169980f7bb469c1728b3e7 100644 (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"