#!/bin/bash

. ${TOOLKIT}-functions.sh

module="linfo"

# allowed ips; uses local kusa-db to build up apache2 allow block
#
allow=$(jtconf $module.allow) || exit_missing_define "$module.allow"

(
	echo "[temp]"
	echo "  allow	^^BLOCK^^"
	case $allow in
	  [Aa][Ll][Ll]*) ;;
	  *) echo "		$(apache2_add_deny All)"
	esac
	for ip in $allow
	do
		echo "		$(apache2_add_allow $ip)"
	done
	echo "^^BLOCK^^"
	echo
) >>$MODLOCALDB

exit 0
