initial commit of file from CVS for smeserver-sarg on Sat Sep 7 21:03:26 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 21:03:26 +10:00
parent 2a1dfb967c
commit ab07cfea54
28 changed files with 2023 additions and 2 deletions

30
root/usr/bin/sarglog Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# select logfile for sarg
# support@dungog.net 2006
if [ "$1" = "squid" ] ; then
/sbin/e-smith/db configuration setprop sarg logfile squid
/sbin/e-smith/expand-template /etc/sarg/sarg.conf
/sbin/e-smith/expand-template /etc/cron.daily/sarg
/sbin/e-smith/expand-template /etc/cron.weekly/sarg
/sbin/e-smith/expand-template /etc/cron.monthly/sarg
echo "sarg to use squid logs"
exit 1
fi
if [ "$1" = "dansguardian" ] ; then
/sbin/e-smith/db configuration setprop sarg logfile dansguardian
/sbin/e-smith/db configuration setprop sarg values abbreviation
/sbin/e-smith/expand-template /etc/sarg/sarg.conf
/sbin/e-smith/expand-template /etc/cron.daily/sarg
/sbin/e-smith/expand-template /etc/cron.weekly/sarg
/sbin/e-smith/expand-template /etc/cron.monthly/sarg
echo "sarg to use dansguardian logs"
exit 1
fi
echo "useage"
echo "sarglog (squid|dansguardian)"
exit 1