#!/bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH

[ -x /usr/bin/innetgr ] || exit 0

# Automatically flush print queues every night if the
# host is a member of the cups-queue-autoflush-hosts netgroup.
for hostname in "$(uname -n)" "$(hostname -s)" ; do
    if innetgr -h $hostname cups-queue-autoflush-hosts ; then
	/usr/share/debian-edu-config/tools/cups-queue-autoflush
    fi
done
