Use new systemd-rpm macros

This commit is contained in:
Vitezslav Crhonek 2012-08-23 11:54:13 +02:00
parent 11acc803c6
commit e4a1245a35

View File

@ -15,7 +15,7 @@ BuildRequires: perl-devel pkgconfig openssl-devel
BuildRequires: cmake
BuildRequires: systemd-units
Version: 2.3.0
Release: 5%{?dist}
Release: 6%{?dist}
Url: http://www.openwsman.org/
License: BSD
Group: Applications/System
@ -203,24 +203,14 @@ rm -rf %{buildroot}
%post server
/sbin/ldconfig
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post openwsmand.service
%preun server
if [ $1 = 0 ] ; then
/bin/systemctl --no-reload disable openwsmand.service > /dev/null 2>&1 || :
/bin/systemctl stop openwsmand.service > /dev/null 2>&1 || :
fi
%systemd_preun openwsmand.service
%postun server
rm -f /var/log/wsmand.log
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then
/bin/systemctl try-restart openwsmand.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart openwsmand.service
/sbin/ldconfig
%post client -p /sbin/ldconfig
@ -294,6 +284,10 @@ fi
%changelog
* Thu Aug 23 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.3.0-6
- Use new systemd-rpm macros
Resolves: #850405
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild