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
|
%if 0%{?suse_version} >= 1010
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1210
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
@ -140,7 +140,7 @@ mkdir -p "$b/%pkg_logdir"
|
|||||||
%_bindir/getent passwd varnish >/dev/null || \
|
%_bindir/getent passwd varnish >/dev/null || \
|
||||||
%_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \
|
%_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \
|
||||||
-d %pkg_home varnish || :
|
-d %pkg_home varnish || :
|
||||||
%if 0%{?service_add_pre:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_pre varnish.service
|
%service_add_pre varnish.service
|
||||||
%service_add_pre varnishlog.service
|
%service_add_pre varnishlog.service
|
||||||
%endif
|
%endif
|
||||||
@ -148,7 +148,7 @@ mkdir -p "$b/%pkg_logdir"
|
|||||||
%post
|
%post
|
||||||
%fillup_and_insserv varnish
|
%fillup_and_insserv varnish
|
||||||
%fillup_and_insserv varnishlog
|
%fillup_and_insserv varnishlog
|
||||||
%if 0%{?service_add_post:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_post varnish.service
|
%service_add_post varnish.service
|
||||||
%service_add_post varnishlog.service
|
%service_add_post varnishlog.service
|
||||||
%endif
|
%endif
|
||||||
@ -156,16 +156,16 @@ mkdir -p "$b/%pkg_logdir"
|
|||||||
%preun
|
%preun
|
||||||
%stop_on_removal varnish
|
%stop_on_removal varnish
|
||||||
%stop_on_removal varnishlog
|
%stop_on_removal varnishlog
|
||||||
%if 0%{?service_del_preun:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_preun varnish.service
|
%service_del_preun varnish.service
|
||||||
%service_del_preun varnishlog.service
|
%service_del_preun varnishlog.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%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 varnish
|
||||||
%restart_on_update varnishlog
|
%restart_on_update varnishlog
|
||||||
%if 0%{?service_del_postun:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_postun varnish.service
|
%service_del_postun varnish.service
|
||||||
%service_del_postun varnishlog.service
|
%service_del_postun varnishlog.service
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user