forked from cockpit/cockpit
add .socket to pre/post
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=10
This commit is contained in:
parent
ee158b40d3
commit
4c04ebd2b7
@ -297,14 +297,14 @@ mv %{buildroot}%{_datadir}/doc/%{name} %{buildroot}%{_docdir}/%{name}/html
|
||||
|
||||
%pre ws
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre %{name}.service
|
||||
%service_add_pre %{name}.service %{name}.socket
|
||||
%endif
|
||||
getent group cockpit-ws >/dev/null || groupadd -r cockpit-ws
|
||||
getent passwd cockpit-ws >/dev/null || useradd -r -g cockpit-ws -d / -s /sbin/nologin -c "User for cockpit-ws" cockpit-ws
|
||||
|
||||
%post ws
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post %{name}.service
|
||||
%service_add_post %{name}.service %{name}.socket
|
||||
%else
|
||||
%systemd_post cockpit.socket
|
||||
%endif
|
||||
@ -313,14 +313,14 @@ test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
|
||||
|
||||
%preun ws
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun %{name}.service
|
||||
%service_del_preun %{name}.service %{name}.socket
|
||||
%else
|
||||
%systemd_preun cockpit.socket
|
||||
%endif
|
||||
|
||||
%postun ws
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun %{name}.service
|
||||
%service_del_postun %{name}.service %{name}.socket
|
||||
%else
|
||||
%systemd_postun_with_restart cockpit.socket
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user