diff --git a/xrdp.spec b/xrdp.spec index 49d4a92..6525559 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -118,10 +118,7 @@ fi /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall - 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 + /bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || : fi %triggerun -- xrdp < 0.6.0-1 @@ -132,10 +129,7 @@ fi # Run these because the SysV package being removed won't do them /sbin/chkconfig --del xrdp >/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 +/bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || : %files