From e4db75c1a7974eddf9af2f0e691849270a340703 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 30 May 2024 11:58:41 +0200 Subject: [PATCH] initial package creation Signed-off-by: Toshaan Bharvani --- SOURCES/icinga-x509.service | 11 +++++ SPECS/icingaweb2-module-x509.spec | 72 +++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 SOURCES/icinga-x509.service create mode 100644 SPECS/icingaweb2-module-x509.spec diff --git a/SOURCES/icinga-x509.service b/SOURCES/icinga-x509.service new file mode 100644 index 0000000..e76115f --- /dev/null +++ b/SOURCES/icinga-x509.service @@ -0,0 +1,11 @@ +[Unit] +Description=Icinga Certificate Monitoring Module Jobs Runner + +[Service] +Type=simple +User=apache +ExecStart=/usr/bin/icingacli x509 jobs run +Restart=on-success + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/icingaweb2-module-x509.spec b/SPECS/icingaweb2-module-x509.spec new file mode 100644 index 0000000..5be1fd0 --- /dev/null +++ b/SPECS/icingaweb2-module-x509.spec @@ -0,0 +1,72 @@ +%global module_name x509 +%global icingaweb_min_version 2.9.0 +%global basedir %{_datadir}/icingaweb2/modules/%{module_name} +%global service_name icinga-%{module_name} +%global service_user apache + +Name: icingaweb2-module-%{module_name} +Version: 1.3.2 +Release: 1%{?dist} +Summary: Certificate Monitoring (x509) - Icinga Web 2 module +Group: Applications/System +License: GPLv2+ +URL: https://icinga.com +Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz +Source1: %{service_name}.service +BuildArch: noarch +BuildRequires: systemd-devel +Requires: systemd +Requires: icingaweb2 >= %{icingaweb_min_version} +Requires: php-Icinga >= %{icingaweb_min_version} +Requires: openssl +Requires: icingaweb2-module-ipl >= 0.1 +Requires: icingaweb2-module-reactbundle >= 0.4 + + +%description +The certificate monitoring module for Icinga keeps track of certificates as +they are deployed in a network environment. It does this by scanning networks +for TLS services and collects whatever certificates it finds along the way. +The certificates are verified using its own trust store. +The module’s web frontend can be used to view scan results, allowing you to +drill down into detailed information about any discovered certificate of your +landscape. + + +%prep +%setup -q + + +%build + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{basedir} +cp -r * %{buildroot}%{basedir} +install -d %{buildroot}%{_unitdir} +install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{service_name}.service +# Replace user in service unit +sed -i -e 's~^User=.*~User=%{service_user}~' %{buildroot}%{_unitdir}/%{service_name}.service + + +%clean +rm -rf %{buildroot} + + +%post +%systemd_post %{service_name}.service +%preun +%systemd_preun %{service_name}.service +%postun +%systemd_postun_with_restart %{service_name}.service + + +%files +%doc README.md LICENSE +%defattr(-,root,root) +%{basedir} +%{_unitdir}/%{service_name}.service + + +%changelog