From 6fa52392b592b8bf50b69e7d3f351ab12756dd61 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Dec 07 2014 21:16:48 +0000 Subject: Use preset in trigger, no need for absolute paths. --- diff --git a/xrdp.spec b/xrdp.spec index 67439e8..a7c9aad 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -121,16 +121,16 @@ touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini %systemd_postun_with_restart xrdp.service %triggerun -- xrdp < 0.6.0-1 -/usr/bin/systemd-sysv-convert --save xrdp >/dev/null 2>&1 ||: +systemd-sysv-convert --save xrdp >/dev/null 2>&1 ||: # If the package is allowed to autostart: -/bin/systemctl --no-reload enable xrdp.service >/dev/null 2>&1 ||: +systemctl preset xrdp.service >/dev/null 2>&1 ||: # 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 || : +if [ "`systemctl is-active xrdp.service`" = 'active' ]; then + systemctl stop xrdp.service >/dev/null 2>&1 || : + systemctl start xrdp.service >/dev/null 2>&1 || : fi