commit ad9533c644e422e7af38015cb3d635169c9e41af
Author: Mateusz Korniak <[email protected]>
Date:   Mon Oct 5 13:20:14 2015 +0200

    Release 2. Restart=on-abort in service file.

 pdnsd.service |  2 +-
 pdnsd.spec    | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/pdnsd.spec b/pdnsd.spec
index 03e8700..7eac39b 100644
--- a/pdnsd.spec
+++ b/pdnsd.spec
@@ -4,13 +4,14 @@ Summary:      A caching dns proxy for small networks or 
dialin accounts
 Summary(pl.UTF-8):     DNS proxy serwer dla małej sieci lub jednostki z 
połączeniem dialup
 Name:          pdnsd
 Version:       1.2.9a
-Release:       1
+Release:       2
 License:       GPL
 Group:         Networking/Daemons
 Source0:       
http://members.home.nl/p.a.rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
 # Source0-md5: 2f3e705d59a0f9308ad9504b24400769
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
+Source3:       %{name}.service
 Patch0:                %{name}-ac_am.patch
 Patch1:                %{name}-query_roots_in_default_conf.patch
 Patch2:                %{name}-ipv6_pktinfo.patch
@@ -76,7 +77,8 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
-
+install -d $RPM_BUILD_ROOT/%{systemdunitdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
 
 %clean
@@ -89,12 +91,14 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add pdnsd
 %service pdnsd restart
+%systemd_post %{name}.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service pdnsd stop
        /sbin/chkconfig --del pdnsd
 fi
+%systemd_preun %{name}.service
 
 %postun
 if [ "$1" = "0" ]; then
@@ -102,10 +106,13 @@ if [ "$1" = "0" ]; then
        %groupremove pdnsd
 fi
 
+%systemd_trigger %{name}.service
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
+%{systemdunitdir}/%{name}.service
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
/etc/sysconfig/pdnsd
 %attr(755,root,root) %{_sbindir}/pdnsd
 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
diff --git a/pdnsd.service b/pdnsd.service
index fab48d3..03dad54 100644
--- a/pdnsd.service
+++ b/pdnsd.service
@@ -6,7 +6,7 @@ After=network.target
 ExecStart=/usr/sbin/pdnsd
 
 # Restarts on abnormal termination
-# Restart=on-abort
+Restart=on-abort
 
 # Config file
 # EnvironmentFile=/etc/sysconfig/pdnsd
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pdnsd.git/commitdiff/ad9533c644e422e7af38015cb3d635169c9e41af

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to