Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
monit
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 10
[-]
[+]
Changed
monit.spec
@@ -65,6 +65,7 @@ MANDIR="%{buildroot}%{_mandir}/man1" \ install +%if 0%{?suse_version} %__install -d \ "%{buildroot}/etc/init.d" \ "%{buildroot}%{_sysconfdir}/monit.d" \ @@ -73,6 +74,17 @@ "%{buildroot}%{_var}/adm/fillup-templates" \ "%{buildroot}%{_var}/lib/monit" \ "%{buildroot}%{_var}/run/monit" +%endif +%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} +%__install -d \ + "%{buildroot}/etc/init.d" \ + "%{buildroot}%{_sysconfdir}/monit.d" \ + "%{buildroot}%{_sbindir}" \ + "%{buildroot}%{_datadir}/monit" \ + "%{buildroot}%{_sysconfdir}/sysconfig" \ + "%{buildroot}%{_var}/lib/monit" \ + "%{buildroot}%{_var}/run/monit" +%endif . vendor-files/sysconfig/monit.tmpl MONIT_BIN="%{_bindir}/monit" @@ -101,24 +113,39 @@ > "${templatefile}" done popd # vendor-files - +%if 0%{?suse_version} %__install -m0754 vendor-files/init/monit "%{buildroot}/etc/init.d/monit" +%endif +%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} +%__install -m0754 contrib/rc.monit "%{buildroot}/etc/init.d/monit" +%endif %__ln_s ../../etc/init.d/monit "%{buildroot}/usr/sbin/rcmonit" %__install -m0754 vendor-files/tools/monit-modifyinittab "%{buildroot}%{_datadir}/monit" +%if 0%{?suse_version} %__install -m0644 vendor-files/sysconfig/monit "%{buildroot}%{_var}/adm/fillup-templates/sysconfig.monit" +%endif +%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} +%__install -m0644 vendor-files/sysconfig/monit "%{buildroot}%{_sysconfdir}/sysconfig/monit +%endif touch "%{buildroot}%{_var}/lib/monit/monit-inittab.state" touch "%{buildroot}%{_var}/run/monit"/monit.{pid,state} %__install -m0644 vendor-files/docu/README README.SUSE %post +%if 0%{?suse_version} %{fillup_and_insserv} +%endif %preun +%if 0%{?suse_version} %{stop_on_removal monit} +%endif %postun +%if 0%{?suse_version} %{restart_on_update monit} %{insserv_cleanup} +%endif %clean %__rm -rf "%{buildroot}" @@ -133,7 +160,12 @@ %{_bindir}/monit %dir %{_datadir}/monit %{_datadir}/monit/monit-modifyinittab +%if 0%{?suse_version} %{_var}/adm/fillup-templates/sysconfig.monit +%endif +%if %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} +%{buildroot}%{_sysconfdir}/sysconfig/monit +%endif %dir %{_var}/lib/monit %ghost %{_var}/lib/monit/monit-inittab.state %dir %{_var}/run/monit