!1 modify systemd post preun postun

Merge pull request !1 from daidai_is_here/dqw_test
This commit is contained in:
openeuler-ci-bot 2020-03-16 20:20:16 +08:00 committed by Gitee
commit 2223514b46

View File

@ -1,6 +1,6 @@
Name: openvpn Name: openvpn
Version: 2.4.8 Version: 2.4.8
Release: 2 Release: 3
Summary: A full-featured open source SSL VPN solution Summary: A full-featured open source SSL VPN solution
License: GPLv2 License: GPLv2
URL: https://community.openvpn.net/openvpn URL: https://community.openvpn.net/openvpn
@ -66,18 +66,41 @@ getent passwd openvpn &>/dev/null || \
-d /etc/openvpn openvpn -d /etc/openvpn openvpn
%post %post
%systemd_post openvpn-client@\*.service if [ $1 -eq 1 ] ; then
%systemd_post openvpn-server@\*.service # Initial installation
systemctl --no-reload preset openvpn-client@\*.service &>/dev/null || :
fi
if [ $1 -eq 1 ] ; then
# Initial installation
systemctl --no-reload preset openvpn-server@\*.service &>/dev/null || :
fi
%preun %preun
%systemd_preun openvpn-client@\*.service if [ $1 -eq 0 ] ; then
%systemd_preun openvpn-server@\*.service # Package removal, not upgrade
systemctl --no-reload disable --now openvpn-client@\*.service &>/dev/null || :
fi
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
systemctl --no-reload disable --now openvpn-server@\*.service &>/dev/null || :
fi
%postun %postun
%systemd_postun_with_restart openvpn-client@\*.service if [ $1 -ge 1 ] ; then
%systemd_postun_with_restart openvpn-server@\*.service # Package upgrade, not uninstall
systemctl try-restart openvpn-client@\*.service &>/dev/null || :
fi
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
systemctl try-restart openvpn-server@\*.service &>/dev/null || :
fi
%files %files
%license AUTHORS COPYING COPYRIGHT.GPL %license AUTHORS COPYING COPYRIGHT.GPL
%config %{_sysconfdir}/%{name}/*/* %config %{_sysconfdir}/%{name}/*/*
@ -100,6 +123,9 @@ getent passwd openvpn &>/dev/null || \
%{_mandir}/man8/%{name}.8* %{_mandir}/man8/%{name}.8*
%changelog %changelog
* Tue Mar 16 2020 daiqianwen <daiqianwen@huawei.com> 2.4.8-3
- modify systemd post preun postun
* Mon Nov 11 2019 guanyalong <guanyalong@huawei.com> 2.4.8-2 * Mon Nov 11 2019 guanyalong <guanyalong@huawei.com> 2.4.8-2
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA