#!/bin/bash -x

# Check configuration file is there
if [ ! -d "/home/aaa/conf/`hostname --fqdn`/squid" ]; 
then echo "Missing configuration files"; exit 1;
fi

# Install the package if needed
aptitude install squid

# Copy its configuration
rm -rf /etc/squid.bkp
mv -f /etc/squid /etc/squid.bkp
cp -Rf /home/aaa/conf/`hostname --fqdn`/squid /etc/

# Restart the daemon
/etc/init.d/squid restart


