config freshclam 'freshclam'
option freshclam_config_file '/etc/clamav/freshclam.conf'
- option UpdateLogFile '/tmp/freshclam.log'
option DatabaseMirror 'database.clamav.net'
option NotifyClamd '/etc/clamav/clamd.conf'
option DatabaseOwner 'root'
validate_freshclam_section() {
uci_load_validate freshclam freshclam "$1" "$2" \
'freshclam_config_file:string' \
- 'UpdateLogFile:string' \
'DatabaseMirror:string' \
'NotifyClamd:string' \
'DatabaseOwner:string' \
mkdir -p "$DatabaseDirectory"
mkdir -p /etc/clamav
- touch /tmp/freshclam.log
touch /tmp/freshclam.pid
mkdir -p "$(dirname $FRESHCLAM_CONFIGFILE)"
ln -sf "$freshclam_config_file" "$FRESHCLAM_CONFIGFILE"
{
- echo "UpdateLogFile " "$UpdateLogFile"
echo "DatabaseMirror " "$DatabaseMirror"
echo "NotifyClamd " "$NotifyClamd"
echo "DatabaseOwner " "$DatabaseOwner"