diff --git a/openssh.spec b/openssh.spec index e5145a2..1746e44 100644 --- a/openssh.spec +++ b/openssh.spec @@ -662,8 +662,8 @@ getent passwd sshd >/dev/null || \ %post server if [ $1 -eq 1 ] ; then + /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl enable sshd.service >/dev/null 2>&1 || : - /bin/systemctl enable sshd-keygen.service >/dev/null 2>&1 || : fi %postun server @@ -671,7 +671,6 @@ fi if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart sshd.service >/dev/null 2>&1 || : - /bin/systemctl try-restart sshd-keygen.service >/dev/null 2>&1 || : fi %preun server @@ -680,13 +679,11 @@ if [ $1 -eq 0 ] ; then /bin/systemctl --no-reload disable sshd.service > /dev/null 2>&1 || : /bin/systemctl --no-reload disable sshd-keygen.service > /dev/null 2>&1 || : /bin/systemctl stop sshd.service > /dev/null 2>&1 || : - /bin/systemctl stop sshd-keygen.service > /dev/null 2>&1 || : fi %triggerun -n openssh-server -- openssh-server < 5.8p2-12 /usr/bin/systemd-sysv-convert --save sshd >/dev/null 2>&1 || : /bin/systemctl enable sshd.service >/dev/null 2>&1 -/bin/systemctl enable sshd-keygen.service >/dev/null 2>&1 /sbin/chkconfig --del sshd >/dev/null 2>&1 || : /bin/systemctl try-restart sshd.service >/dev/null 2>&1 || : # This one was never a service, so we don't simply restart it