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