%if %{_systemd_el}
%systemd_preun puppetserver.service
%endif
%if %{_systemd_sles}
%service_del_preun puppetserver.service
%endif
%if %{_with_sysvinit}
# If this is an uninstall (as opposed to an upgrade) then
#  we want to shut down and disable the service.
if [ "$1" = "0" ] ; then
    /sbin/service %{name} stop >/dev/null 2>&1
    /sbin/chkconfig --del %{name}
fi
%endif
