[maradns] add missing scriptlets

Tom Callaway spot at fedoraproject.org
Fri Sep 9 15:36:08 UTC 2011


commit 8a9f30c7b0ef9ac1f8ccf9e0aaab3af505c2d7e0
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Fri Sep 9 11:35:56 2011 -0400

    add missing scriptlets

 maradns.spec |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/maradns.spec b/maradns.spec
index e914e7d..11a1093 100644
--- a/maradns.spec
+++ b/maradns.spec
@@ -1,6 +1,6 @@
 Name:		maradns
 Version:	1.3.07.09
-Release:	6%{?dist}
+Release:	7%{?dist}
 Summary:	Authoritative and recursive DNS server made with security in mind
 
 Source0:	http://www.maradns.org/download/1.3/%{version}/%{name}-%{version}.tar.lzma
@@ -15,6 +15,8 @@ BuildRequires:		lzma
 BuildRequires:		systemd-units
 Requires(pre):		shadow-utils
 Requires(post):		systemd-sysv
+Requires(preun):	systemd-units
+Requires(postun):	systemd-units
 
 %description
 MaraDNS is a package that implements the Domain Name Service (DNS), an
@@ -144,8 +146,23 @@ fi
 if [ $1 -eq 1 ]; then
 	echo maradns_uid=$(id -u maradns) >> %{_sysconfdir}/mararc
 	echo maradns_gid=$(id -g maradns) >> %{_sysconfdir}/mararc
+	# Initial installation 
+	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
 
+%preun
+if [ $1 -eq 0 ] ; then
+	# Package removal, not upgrade
+	/bin/systemctl --no-reload disable apache-httpd.service > /dev/null 2>&1 || :
+	/bin/systemctl stop apache-httpd.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+	# Package upgrade, not uninstall
+	/bin/systemctl try-restart apache-httpd.service >/dev/null 2>&1 || :
+fi
 
 %triggerun -- maradns < 1.3.07.09-6
 # Save the current service runlevel info
@@ -163,6 +180,9 @@ fi
 
 
 %changelog
+* Fri Sep 09 2011 Tom Callaway <spot at fedoraproject.org> - 1.3.09.09-7
+- add missing scriptlets
+
 * Thu Sep 08 2011 Tom Callaway <spot at fedoraproject.org> - 1.3.07.09-6
 - convert to systemd
 


More information about the scm-commits mailing list