diff options
author | Remi Collet <remi@remirepo.net> | 2019-01-16 09:35:11 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-01-16 09:35:11 +0100 |
commit | a9abf06a9746e976747b6c2e7c55e23f9f49b3ab (patch) | |
tree | ed334f6d4a06a1f276d34f87ef66f48bc29b18b1 | |
parent | acf99b02610aadddd42dc434c36ed3fe0b9eb5af (diff) |
fix for non-systemd distro
-rw-r--r-- | unit.spec | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -28,7 +28,6 @@ Source1: unit.service Source2: unit.init Source3: unit.sysconf - # Use system crypto policy Patch0: https://github.com/nginx/unit/pull/215.patch @@ -39,7 +38,10 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %else -Requires: initscripts >= 8.36 +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts %endif Provides: nginx-unit = %{version}-%{release} @@ -119,7 +121,7 @@ install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d %else -install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name} +install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/unitd install -p -D -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name} %endif @@ -177,7 +179,7 @@ fi %dir %attr(0755,root,root) %ghost /run/unit %else -%config(noreplace) %{_sysconfdir}/sysconfig/unit +%config(noreplace) %{_sysconfdir}/sysconfig/unitd %dir %attr(0755,root,root) %{_localstatedir}/run/unit %{_initrddir}/unit %endif |