[xrdp] Do explicit stop/start on upgrade, to force xrdp-sesman restart as well.
bojan
bojan at fedoraproject.org
Sat May 26 01:48:59 UTC 2012
commit 5c7d5110a75b9c52789814125ebc0bee4326fb3d
Author: Bojan Smojver <bojan at rexursive.com>
Date: Sat May 26 11:48:21 2012 +1000
Do explicit stop/start on upgrade, to force xrdp-sesman restart as well.
xrdp.spec | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/xrdp.spec b/xrdp.spec
index ff6ee4a..0ac9a84 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
More information about the scm-commits
mailing list