#!/bin/sh

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

for hostname in "$(uname -n)" "$(hostname -s)" ; do

	# Automatically restart disabled print queues every hour if the
	# host is a member of the cups-queue-autoreenable-hosts netgroup.
	if [ -x /usr/share/debian-edu-config/tools/cups-queue-autoreenable ] &&
	   innetgr -h $hostname cups-queue-autoreenable-hosts ; then
		exec /usr/share/debian-edu-config/tools/cups-queue-autoreenable
	fi

done
