#! /bin/sh

sed -i -e '/^[       ]*squidguard /,/}/{
  s/auto-update daily/auto-update \{\n update-hour 1 \n\}/
}' $1

sed -i -e '/^[       ]*squidguard /,/}/{
  s/auto-update weekly/auto-update \{\n update-hour 1 \n\}/
}' $1

sed -i -e '/^[       ]*squidguard /,/}/{
  s/auto-update monthly/auto-update \{\n update-hour 1 \n\}/
}' $1

rm -f /etc/cron.daily/squidGuard
rm -f /etc/cron.weekly/squidGuard
rm -f /etc/cron.monthly/squidGuard
