forked from pool/collectd
Accepting request 138701 from server:monitoring
- Add systemd rules. (forwarded request 131808 from elvigia) OBS-URL: https://build.opensuse.org/request/show/138701 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/collectd?expand=0&rev=12
This commit is contained in:
commit
2a207b36c2
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 27 21:39:32 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Add systemd rules.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 30 14:09:52 UTC 2012 - chris@computersalat.de
|
Mon Jul 30 14:09:52 UTC 2012 - chris@computersalat.de
|
||||||
|
|
||||||
|
14
collectd.service
Normal file
14
collectd.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=System statistics collection daemon
|
||||||
|
After=local-fs.target network.target
|
||||||
|
Requires=local-fs.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/collectd -C /etc/collectd.conf -f
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -131,6 +131,7 @@ Source10: http://devresources.linux-foundation.org/dev/iproute2/download/i
|
|||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=388026
|
# see https://bugzilla.novell.com/show_bug.cgi?id=388026
|
||||||
Source20: collectd-pthread.pc
|
Source20: collectd-pthread.pc
|
||||||
Source99: collectd-rpmlintrc
|
Source99: collectd-rpmlintrc
|
||||||
|
Source100: collectd.service
|
||||||
Patch4: collectd-lib64.patch
|
Patch4: collectd-lib64.patch
|
||||||
Patch7: collectd-fix-config.patch
|
Patch7: collectd-fix-config.patch
|
||||||
Patch9: collectd-version.patch
|
Patch9: collectd-version.patch
|
||||||
@ -262,6 +263,9 @@ BuildRequires: libxtables-devel
|
|||||||
%endif
|
%endif
|
||||||
%if %suse_version >= 1210
|
%if %suse_version >= 1210
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
BuildRequires: systemd
|
||||||
|
%{?systemd_requires}
|
||||||
|
%define has_systemd 1
|
||||||
%endif
|
%endif
|
||||||
# in case we'd like to split it later:
|
# in case we'd like to split it later:
|
||||||
Provides: collectd-perl = %{version}-%{release}
|
Provides: collectd-perl = %{version}-%{release}
|
||||||
@ -789,16 +793,38 @@ cat<<EOF >README.plugins-all
|
|||||||
This package is empty but depends on all collectd plugin subpackages.
|
This package is empty but depends on all collectd plugin subpackages.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%__install -D -m0644 %{SOURCE100} %{buildroot}%{_unitdir}/collectd.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal collectd
|
%stop_on_removal collectd
|
||||||
|
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%service_del_preun %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update collectd
|
%restart_on_update collectd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%service_del_postun %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%service_add_pre %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_only collectd}
|
%{fillup_only collectd}
|
||||||
|
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%service_add_post %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%post -n libcollectdclient0 -p /sbin/ldconfig
|
%post -n libcollectdclient0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n libcollectdclient0 -p /sbin/ldconfig
|
%postun -n libcollectdclient0 -p /sbin/ldconfig
|
||||||
@ -844,6 +870,9 @@ EOF
|
|||||||
%dir %{_localstatedir}/lib/collectd
|
%dir %{_localstatedir}/lib/collectd
|
||||||
/etc/init.d/collectd
|
/etc/init.d/collectd
|
||||||
/usr/sbin/rccollectd
|
/usr/sbin/rccollectd
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%{_unitdir}/collectd.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%files web
|
%files web
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user