Accepting request 231083 from server:monitoring
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/231083 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nagios-rpm-macros?expand=0&rev=14
This commit is contained in:
commit
6e5e87886b
@ -73,26 +73,26 @@
|
||||
#
|
||||
|
||||
# User, Icinga runs under
|
||||
%icinga_user icinga
|
||||
%icinga2_user icinga
|
||||
# Group, Icinga runs under
|
||||
%icinga_group icinga
|
||||
%icinga2_group icinga
|
||||
# User, that can execute commands via %{icinga_command_file}
|
||||
%icinga_command_user wwwrun
|
||||
%icinga2_command_user wwwrun
|
||||
# Group, that can execute commands via %{icinga_command_file}
|
||||
%icinga_command_group icingacmd
|
||||
%icinga2_command_group icingacmd
|
||||
|
||||
# Add Icinga user and groups
|
||||
%icinga_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga_group} 2>/dev/null || :\
|
||||
/usr/sbin/useradd -r -g %{icinga_group} -d %{icinga_localstatedir} -s /bin/false -c "User for Icinga" %{icinga_user} 2>/dev/null || :\
|
||||
%icinga2_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga2_group} 2>/dev/null || :\
|
||||
/usr/sbin/useradd -r -g %{icinga2_group} -d %{icinga2_localstatedir} -s /bin/false -c "User for Icinga" %{icinga2_user} 2>/dev/null || :\
|
||||
%{nil}
|
||||
|
||||
%icinga_command_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga_command_group} 2>/dev/null || :\
|
||||
%icinga2_command_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga2_command_group} 2>/dev/null || :\
|
||||
%if 0%{?suse_version} > 01220 \
|
||||
/usr/sbin/usermod -a -G %{icinga_command_group} %{icinga_user} || :\
|
||||
/usr/sbin/usermod -a -G %{icinga2_command_group} %{icinga2_user} || :\
|
||||
%else \
|
||||
/usr/sbin/groupmod -A %{icinga_user} %{icinga_command_group} 2>/dev/null || :\
|
||||
/usr/sbin/groupmod -A %{icinga2_user} %{icinga2_command_group} 2>/dev/null || :\
|
||||
%endif \
|
||||
%{nil}
|
||||
|
||||
|
98
macros.icinga2
Normal file
98
macros.icinga2
Normal file
@ -0,0 +1,98 @@
|
||||
# macros.icinga file
|
||||
# macros for Icinga (sub-)package building - handle with care
|
||||
#
|
||||
|
||||
#
|
||||
# directories
|
||||
#
|
||||
|
||||
# install all plugins into this directory
|
||||
# Please note: we use the old Nagios directory here, as plugins are
|
||||
# currently compatible
|
||||
%icinga2_plugindir %{_prefix}/lib/nagios/plugins
|
||||
# install all event handler scripts into this directory
|
||||
%icinga2_eventhandlerdir %{_prefix}/lib/icinga/eventhandler
|
||||
# files like p1.pl are located directly in this directory
|
||||
%icinga2_libdir %{_prefix}/lib/icinga2
|
||||
# Icinga uses this directory for status files
|
||||
%icinga2_localstatedir %{_var}/lib/icinga2
|
||||
# Icinga configuration should be stored here
|
||||
%icinga2_sysconfdir %{_sysconfdir}/icinga2
|
||||
# Icinga static webpages, stylesheets and theme(s), online documentation
|
||||
%icinga2_datadir %{_datadir}/icinga2
|
||||
# Icinga spool dir
|
||||
%icinga2_spooldir %{_var}/spool/icinga2
|
||||
# Icinga run dir
|
||||
%icinga2_rundir %{_localstatedir}/run/icinga2
|
||||
# Icinga logfile dir
|
||||
%icinga2_logdir %{_var}/log/icinga2
|
||||
# Icinga cgi directory
|
||||
%icinga2_cgidir %{_prefix}/lib/icinga2/cgi
|
||||
# Icinga cgi logging directory
|
||||
%icinga2_cgi_logdir %{icinga2_logdir}/www
|
||||
# Icinga check results spool directory
|
||||
%icinga2_checkresultdir %{icinga2_spooldir}/checkresults
|
||||
# Icinga external command file directory
|
||||
%icinga2_cmd_filedir %{icinga2_rundir}
|
||||
# Icinga temp directory
|
||||
%icinga2_tempdir %{icinga2_rundir}/tmp
|
||||
|
||||
#
|
||||
# files
|
||||
#
|
||||
|
||||
# This is where the current status of all monitored services and
|
||||
# hosts is stored
|
||||
%icinga2_status_file %{icinga2_spooldir}/status.dat
|
||||
# This is the file that Icinga should use to store host and
|
||||
# service state information before it shuts down.
|
||||
%icinga2_state_retention_file %{icinga2_spooldir}/retention.dat
|
||||
# Icinga lock file
|
||||
%icinga2_lockfile %{icinga2_rundir}/icinga2.pid
|
||||
# Icinga ido2db lock file
|
||||
%icinga2_ido2db_lockfile %{icinga2_rundir}/ido2db.pid
|
||||
# Icinga external command file - the name icinga.cmd is static, only the
|
||||
# directory is configurable
|
||||
%icinga2_cmdfile %{icinga2_cmd_filedir}/icinga2.cmd
|
||||
%icinga2_command_file %{icinga2_cmdfile}
|
||||
# Icinga ido2db socket file
|
||||
%icinga2_ido2db_socketfile %{icinga2_rundir}/ido2db.sock
|
||||
# Icinga initscript error file
|
||||
%icinga2_chkfile %{icinga2_spooldir}/icinga2.chk
|
||||
# Icinga idomod tmp file
|
||||
%icinga2_idomod_tmpfile %{icinga_spooldir}/idomod.tmp
|
||||
# Icinga HTTP auth file
|
||||
%icinga2_http_authfile %{icinga_sysconfdir}/htpasswd.users
|
||||
# Icinga logrotate file
|
||||
%icinga2_logrotatefile %{_sysconfdir}/logrotate.d/icinga2
|
||||
# Icinga temp file
|
||||
%icinga2_tempfile %{icinga2_rundir}/icinga2.tmp
|
||||
|
||||
#
|
||||
# users and groups
|
||||
#
|
||||
|
||||
# User, Icinga runs under
|
||||
%icinga_user icinga
|
||||
# Group, Icinga runs under
|
||||
%icinga_group icinga
|
||||
# User, that can execute commands via %{icinga_command_file}
|
||||
%icinga_command_user wwwrun
|
||||
# Group, that can execute commands via %{icinga_command_file}
|
||||
%icinga_command_group icingacmd
|
||||
|
||||
# Add Icinga user and groups
|
||||
%icinga_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga_group} 2>/dev/null || :\
|
||||
/usr/sbin/useradd -r -g %{icinga_group} -d %{icinga_localstatedir} -s /bin/false -c "User for Icinga" %{icinga_user} 2>/dev/null || :\
|
||||
%{nil}
|
||||
|
||||
%icinga_command_user_group_add() \
|
||||
/usr/sbin/groupadd -r %{icinga_command_group} 2>/dev/null || :\
|
||||
%if 0%{?suse_version} > 01220 \
|
||||
/usr/sbin/usermod -a -G %{icinga_command_group} %{icinga_user} || :\
|
||||
%else \
|
||||
/usr/sbin/groupmod -A %{icinga_user} %{icinga_command_group} 2>/dev/null || :\
|
||||
%endif \
|
||||
%{nil}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 15 18:08:12 UTC 2014 - lars@linux-schulserver.de
|
||||
|
||||
- update to 0.09:
|
||||
+ added macros.icinga2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 17:11:47 UTC 2013 - lars@linux-schulserver.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package nagios-rpm-macros
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -20,7 +20,7 @@ Name: nagios-rpm-macros
|
||||
Summary: RPM Macros for Nagios based packages
|
||||
License: BSD-3-Clause
|
||||
Group: System/Monitoring
|
||||
Version: 0.08
|
||||
Version: 0.09
|
||||
Release: 0
|
||||
Url: http://en.opensuse.org/Nagios
|
||||
Source0: macros.nagios
|
||||
@ -30,6 +30,7 @@ Source3: macros.check_mk
|
||||
Source4: macros.pnp4nagios
|
||||
Source5: macros.nagiosgrapher
|
||||
Source6: macros.icinga
|
||||
Source7: macros.icinga2
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -50,6 +51,7 @@ cat %{S:3} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios
|
||||
cat %{S:4} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios
|
||||
cat %{S:5} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios
|
||||
cat %{S:6} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios
|
||||
cat %{S:7} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios
|
||||
|
||||
%clean
|
||||
rm -rf %buildroot
|
||||
|
Loading…
x
Reference in New Issue
Block a user