From 993073e124364819ea6ce30000a55d4cae78e937 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 23 Jan 2017 22:51:59 -0800 Subject: [PATCH] Stop services on package removal (see bug 1349083) --- xrdp.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xrdp.spec b/xrdp.spec index d9dd3d9..8b09712 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -99,6 +99,10 @@ fi %preun %systemd_preun xrdp.service +if [ $1 -eq 0 ]; then + # Stop services on package removal (see bug 1349083) + systemctl stop xrdp.service > /dev/null 2>&1 || : +fi %postun %systemd_postun_with_restart xrdp.service