From c17bb4da02ae6e9d7db357fec5c6e31bd9bf6526 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Mon, 28 May 2012 10:32:55 +1000 Subject: [PATCH] Revert "Revert "Do explicit stop/start on upgrade, to force xrdp-sesman restart as well."" This reverts commit 59d72aa51361d050666dc6705e899e3e8ccba2a1. --- xrdp.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xrdp.spec b/xrdp.spec index 6525559..49d4a92 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -118,7 +118,10 @@ fi /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall - /bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || : + if [ "`/bin/systemctl is-active xrdp.service`" = 'active' ]; then + /bin/systemctl stop xrdp.service >/dev/null 2>&1 || : + /bin/systemctl start xrdp.service >/dev/null 2>&1 || : + fi fi %triggerun -- xrdp < 0.6.0-1 @@ -129,7 +132,10 @@ fi # Run these because the SysV package being removed won't do them /sbin/chkconfig --del xrdp >/dev/null 2>&1 || : -/bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || : +if [ "`/bin/systemctl is-active xrdp.service`" = 'active' ]; then + /bin/systemctl stop xrdp.service >/dev/null 2>&1 || : + /bin/systemctl start xrdp.service >/dev/null 2>&1 || : +fi %files