From fcc33339e4a6a5f8967f4c87edd3ef9f8b07d28c Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 21 Feb 2014 16:47:30 +0400 Subject: [PATCH] Stop service and remove SysV symling only during uninstall See also: https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Syntax Signed-off-by: Peter Lemenkov --- el/mediaproxy-ng.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/el/mediaproxy-ng.spec b/el/mediaproxy-ng.spec index ed8ae8489..bf8b7a158 100644 --- a/el/mediaproxy-ng.spec +++ b/el/mediaproxy-ng.spec @@ -128,8 +128,10 @@ true %preun -/sbin/service mediaproxy-ng stop -/sbin/chkconfig --del mediaproxy-ng +if [ $1 = 0 ] ; then + /sbin/service %{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} +fi %preun dkms