From 2e523ef06e9aa27d8b7fa3c624220d78ab5752dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 18 Aug 2016 15:10:02 +0300 Subject: [PATCH] register systemd service --- docker.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker.spec b/docker.spec index c7c5d56..84e0405 100644 --- a/docker.spec +++ b/docker.spec @@ -17,6 +17,7 @@ Version: 1.12.0 Release: 3 License: Apache v2.0 Group: Applications/System +# https://github.com/docker/docker/releases Source0: https://github.com/docker/docker/archive/v%{version}/%{name}-%{version}.tar.gz # Source0-md5: 7990440b022e93f3e7036bcfd12970f2 Source1: https://github.com/opencontainers/runc/archive/%{runc_commit}/runc-%{runc_commit}.tar.gz @@ -204,17 +205,20 @@ cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir} %post /sbin/chkconfig --add %{name} %service -n %{name} restart +%systemd_post %{name}.service %preun if [ "$1" = "0" ]; then %service -q %{name} stop /sbin/chkconfig --del %{name} fi +%systemd_preun %{name}.service %postun if [ "$1" = "0" ]; then %groupremove docker fi +%systemd_reload %clean rm -rf $RPM_BUILD_ROOT -- 2.44.0