forked from pool/varnish
systemd guards
OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=56
This commit is contained in:
parent
d23012279c
commit
6dbb5e2ecc
12
varnish.spec
12
varnish.spec
@ -41,7 +41,7 @@ Prereq(post): %_sbindir/useradd %_sbindir/groupadd
|
||||
%if 0%{?suse_version} >= 1010
|
||||
Recommends: logrotate
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
@ -140,7 +140,7 @@ mkdir -p "$b/%pkg_logdir"
|
||||
%_bindir/getent passwd varnish >/dev/null || \
|
||||
%_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \
|
||||
-d %pkg_home varnish || :
|
||||
%if 0%{?service_add_pre:1}
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_add_pre varnish.service
|
||||
%service_add_pre varnishlog.service
|
||||
%endif
|
||||
@ -148,7 +148,7 @@ mkdir -p "$b/%pkg_logdir"
|
||||
%post
|
||||
%fillup_and_insserv varnish
|
||||
%fillup_and_insserv varnishlog
|
||||
%if 0%{?service_add_post:1}
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_add_post varnish.service
|
||||
%service_add_post varnishlog.service
|
||||
%endif
|
||||
@ -156,16 +156,16 @@ mkdir -p "$b/%pkg_logdir"
|
||||
%preun
|
||||
%stop_on_removal varnish
|
||||
%stop_on_removal varnishlog
|
||||
%if 0%{?service_del_preun:1}
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_preun varnish.service
|
||||
%service_del_preun varnishlog.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
# Does not this very much conflict? But rpmlint wants to have it...
|
||||
# Does not sysv+systemd very much conflict? But rpmlint wants to have it...
|
||||
%restart_on_update varnish
|
||||
%restart_on_update varnishlog
|
||||
%if 0%{?service_del_postun:1}
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_postun varnish.service
|
||||
%service_del_postun varnishlog.service
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user