#!/bin/bash

GX_FILTER_PROFILE=off;

if [ -e /etc/groovix/filter/$GX_FILTER_PROFILE/squidGuard.conf ] ; then
	cp /etc/groovix/filter/$GX_FILTER_PROFILE/squidGuard.conf /etc/squidguard/squidGuard.conf
fi

if [ -e /etc/groovix/filter/$GX_FILTER_PROFILE/squid.bash ] ; then
        bash /etc/groovix/filter/$GX_FILTER_PROFILE/squid.bash
fi


if [ -e /etc/groovix/filter/$GX_FILTER_PROFILE/iptables.bash ] ; then
	bash /etc/groovix/filter/$GX_FILTER_PROFILE/iptables.bash
fi
	
if [ -e /etc/groovix/filter/$GX_FILTER_PROFILE/hosts.bash ] ; then
        bash /etc/groovix/filter/$GX_FILTER_PROFILE/hosts.bash
fi

echo "$GX_FILTER_PROFILE" > /var/lib/groovix/filter/last-state

