PREUN
/bin/sh
if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable --now cups-browsed.service || :
fi
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service cups-filters $1 cups-browsed
# put UpdateCUPSQueuesMaxPerCall and PauseBetweenCUPSQueueUpdates into cups-browsed.conf
# for making cups-browsed work more stable for environments with many print queues
# remove this after 1-2 releases
for directive in "UpdateCUPSQueuesMaxPerCall" "PauseBetweenCUPSQueueUpdates"
do
found=`/usr/bin/grep "^[[:blank:]]*$directive" /etc/cups/cups-browsed.conf`
if [ -z "$found" ]
then
if [ "x$directive" == "xUpdateCUPSQueuesMaxPerCall" ]
then
/usr/bin/echo "UpdateCUPSQueuesMaxPerCall 20" >> /etc/cups/cups-browsed.conf
else
/usr/bin/echo "PauseBetweenCUPSQueueUpdates 5" >> /etc/cups/cups-browsed.conf
fi
fi
done
POSTUN
/bin/sh
if [ $1 -ge 1 ] && [ -x /usr/bin/systemctl ]; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart cups-browsed.service || :
fi