diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 7c8a8341b..cf209421f 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -19,7 +19,7 @@ file(GLOB DOCSRCS "*.md") if(UNIX OR CYGWIN) install( - FILES icinga2.8 icinga2-prepare-dirs.8 + FILES icinga2.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 ) endif() diff --git a/doc/icinga2-prepare-dirs.8 b/doc/icinga2-prepare-dirs.8 deleted file mode 100644 index 20104a9de..000000000 --- a/doc/icinga2-prepare-dirs.8 +++ /dev/null @@ -1,28 +0,0 @@ -.TH ICINGA2 "15" "June 2014" "icinga2 - The Icinga 2 network monitoring daemon." "System Administration Utilities" - -.SH NAME -icinga2-prepare-dirs \- Prepare directories and their permissions for use by Icinga 2. - -.SH DESCRIPTION -This script is used internally by the initscripts of Icinga 2 to prepare -prepare directories and their permissions. This script is not intended to be called by users. - -.SH OPTIONS -.TP -\fB\fR -Absolute path to the sysconfig file of Icinga 2. - -.SH AUTHOR -Icinga2 is maintained by the Icinga Project . - -.SH "REPORTING BUGS" -Report bugs at -.br -Icinga home page: - -.SH COPYRIGHT -Copyright \(co 2012\-2014 Icinga Development Team (http://www.icinga.org) -License GPLv2+: GNU GPL version 2 or later -.br -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. diff --git a/etc/initsystem/CMakeLists.txt b/etc/initsystem/CMakeLists.txt index 630c9f474..97341506a 100644 --- a/etc/initsystem/CMakeLists.txt +++ b/etc/initsystem/CMakeLists.txt @@ -29,8 +29,8 @@ if(NOT WIN32) ) install( - FILES icinga2-prepare-dirs - DESTINATION ${CMAKE_INSTALL_SBINDIR} + FILES prepare-dirs + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/icinga2 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) diff --git a/etc/initsystem/icinga2.init.d.cmake b/etc/initsystem/icinga2.init.d.cmake index c47419322..5d4b99174 100644 --- a/etc/initsystem/icinga2.init.d.cmake +++ b/etc/initsystem/icinga2.init.d.cmake @@ -62,7 +62,7 @@ fi # Start Icinga 2 start() { printf "Starting Icinga 2: " - @CMAKE_INSTALL_FULL_SBINDIR@/icinga2-prepare-dirs $SYSCONFIGFILE + @CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs $SYSCONFIGFILE if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -d -e $ICINGA2_ERROR_LOG > $ICINGA2_STARTUP_LOG 2>&1; then echo "Error starting Icinga. Check '$ICINGA2_STARTUP_LOG' for details." diff --git a/etc/initsystem/icinga2.service.cmake b/etc/initsystem/icinga2.service.cmake index 512a9fec8..4f63805be 100644 --- a/etc/initsystem/icinga2.service.cmake +++ b/etc/initsystem/icinga2.service.cmake @@ -5,7 +5,7 @@ After=syslog.target postgresql.service mariadb.service carbon-cache.service [Service] Type=forking EnvironmentFile=@ICINGA2_SYSCONFIGFILE@ -ExecStartPre=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2-prepare-dirs @ICINGA2_SYSCONFIGFILE@ +ExecStartPre=@CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs @ICINGA2_SYSCONFIGFILE@ ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} PIDFile=@ICINGA2_RUNDIR@/icinga2/icinga2.pid ExecReload=/bin/kill -HUP $MAINPID diff --git a/etc/initsystem/icinga2-prepare-dirs b/etc/initsystem/prepare-dirs similarity index 100% rename from etc/initsystem/icinga2-prepare-dirs rename to etc/initsystem/prepare-dirs diff --git a/icinga2.spec b/icinga2.spec index de5ce67ad..12b99123c 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -485,8 +485,7 @@ exit 0 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/* %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/* %config(noreplace) %{_sysconfdir}/%{name}/scripts/* -%{_sbindir}/%{name}-prepare-dirs -%{_mandir}/man8/%{name}-prepare-dirs.8.gz +/usr/lib/icinga2/prepare-dirs %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name} %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp