systemd support for rhel7
This commit is contained in:
parent
85aa9542c9
commit
8859a22ca6
19
varnish.spec
19
varnish.spec
@ -6,7 +6,7 @@
|
|||||||
Summary: High-performance HTTP accelerator
|
Summary: High-performance HTTP accelerator
|
||||||
Name: varnish
|
Name: varnish
|
||||||
Version: 4.0.0
|
Version: 4.0.0
|
||||||
Release: 3%{?v_rc}%{?dist}.1
|
Release: 4%{?v_rc}%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.varnish-cache.org/
|
URL: http://www.varnish-cache.org/
|
||||||
@ -36,7 +36,7 @@ Requires(preun): /sbin/service
|
|||||||
%if %{undefined suse_version}
|
%if %{undefined suse_version}
|
||||||
Requires(preun): initscripts
|
Requires(preun): initscripts
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
Requires(post): systemd-sysv
|
Requires(post): systemd-sysv
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
@ -145,7 +145,7 @@ install -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/varnish/default.vc
|
|||||||
install -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish
|
install -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish
|
||||||
|
|
||||||
# systemd support
|
# systemd support
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -D -m 0644 redhat/varnish.service %{buildroot}%{_unitdir}/varnish.service
|
install -D -m 0644 redhat/varnish.service %{buildroot}%{_unitdir}/varnish.service
|
||||||
install -D -m 0644 redhat/varnish.params %{buildroot}%{_sysconfdir}/varnish/varnish.params
|
install -D -m 0644 redhat/varnish.params %{buildroot}%{_sysconfdir}/varnish/varnish.params
|
||||||
@ -182,7 +182,7 @@ rm -rf %{buildroot}
|
|||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/varnish
|
%config(noreplace) %{_sysconfdir}/logrotate.d/varnish
|
||||||
|
|
||||||
# systemd from fedora 17
|
# systemd from fedora 17
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||||
%{_unitdir}/varnish.service
|
%{_unitdir}/varnish.service
|
||||||
%{_unitdir}/varnishncsa.service
|
%{_unitdir}/varnishncsa.service
|
||||||
%{_unitdir}/varnishlog.service
|
%{_unitdir}/varnishlog.service
|
||||||
@ -235,7 +235,7 @@ getent passwd varnish >/dev/null || \
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||||
|
|
||||||
# Fedora 17
|
# Fedora 17
|
||||||
%if 0%{?fedora} == 17
|
%if 0%{?fedora} == 17
|
||||||
@ -244,7 +244,7 @@ if [ $1 -eq 1 ] ; then
|
|||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fedora 18+
|
# Fedora 18+, rhel7+
|
||||||
%else
|
%else
|
||||||
%systemd_post varnish.service
|
%systemd_post varnish.service
|
||||||
%endif
|
%endif
|
||||||
@ -273,7 +273,7 @@ test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc
|
|||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
||||||
%if 0%{?fedora} >= 18
|
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
||||||
%systemd_preun varnish.service
|
%systemd_preun varnish.service
|
||||||
%else
|
%else
|
||||||
|
|
||||||
@ -297,11 +297,14 @@ fi
|
|||||||
|
|
||||||
%postun libs
|
%postun libs
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%if 0%{?fedora} >= 18
|
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
||||||
%systemd_postun_with_restart varnish.service
|
%systemd_postun_with_restart varnish.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 30 2014 Ingvar Hagelnd <ingvar@redpill-linpro.com> 4.0.0-4
|
||||||
|
- systemd support for rhel7
|
||||||
|
|
||||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-3.1
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-3.1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user