. /etc/sysconfig/tmpwatch
fi
-# NOTE: DISABLE_TMPWATCH_* vars are not official, only here to handle migration from < 2.11-2.1
+/usr/sbin/tmpwatch ${OPTIONS} -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix \
+ -x /tmp/.ICE-unix -x /tmp/.Test-unix -X /tmp/.s.PGSQL.\* 240 /tmp
-if [ "$DISABLE_TMPWATCH_CRON" != "yes" ]; then
- /usr/sbin/tmpwatch ${OPTIONS} -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix \
- -x /tmp/.ICE-unix -x /tmp/.Test-unix -X /tmp/.s.PGSQL.\* 240 /tmp
-
- # Cleanup amavis quarantine:
- if [ ${AMAVIS_QUARANTINE} -gt 0 ] && [ -d /var/spool/amavis/virusmails ]; then
- /usr/sbin/tmpwatch ${OPTIONS} ${AMAVIS_QUARANTINE} /var/spool/amavis/virusmails
- fi
+# Cleanup amavis quarantine:
+if [ ${AMAVIS_QUARANTINE} -gt 0 ] && [ -d /var/spool/amavis/virusmails ]; then
+ /usr/sbin/tmpwatch ${OPTIONS} ${AMAVIS_QUARANTINE} /var/spool/amavis/virusmails
fi
-[ "$DISABLE_TMPWATCH_CRON_DIRS" = "yes" ] && exit 0
-
# process extra .conf files
for file in /etc/tmpwatch/*.conf; do
grep ^/ ${file} | while read DIRECTORY TIME OPTS; do
%postun
%systemd_reload
-%triggerpostun -- %{name} < 2.9.1-4
-if [ -f /usr/sbin/amavisd ]; then
- echo "WARNING!! Take a look at /etc/sysconfig/%{name}"
- echo "That version has enabled amavis-spool cleaning"
-fi
-
-%triggerun -- %{name} < 2.11-2.1
-# if previous install had /etc/cron.daily/* files unlinked, disable the cronjob
-if [ ! -e /etc/cron.daily/tmpwatch ]; then
- echo DISABLE_TMPWATCH_CRON=yes >> /etc/sysconfig/tmpwatch
-fi
-
-if [ ! -e /etc/cron.daily/tmpwatch.directories ]; then
- echo DISABLE_TMPWATCH_CRON_DIRS=yes >> /etc/sysconfig/tmpwatch
-fi
-
%triggerpostun -- %{name} < 2.11-10
%systemd_service_enable cronjob-%{name}.timer