#!/bin/bash

. ${TOOLKIT}-functions.sh

module="srv-glpi"

# allowed ips
#
allowed=$(jtconf $module.allow) 

# pass lines to run-install script, as temporary defines in kusa-db,
# using local db $MODLOCALDB
(
	echo "[temp]"
	echo "  allow	^^BLOCK^^"
	case $allowed in
	  [Aa][Ll][Ll]*) ;;
	  *) echo "		$(apache2_add_deny All)"
	esac
	for ip in $allowed
	do
		echo "		$(apache2_add_allow $ip)"
	done
	echo "^^BLOCK^^"
	echo
) >>$MODLOCALDB

exit 0
