Changeset 127197


Ignore:
Timestamp:
Oct 22, 2014, 7:58:32 PM (5 years ago)
Author:
pixilla@…
Message:

sysutils/clamav-server:

  • Update version to 0.98.4.
  • Add conf files on activate if they do not exist. Closes #35113
  • White space edits to notes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/sysutils/clamav-server/Portfile

    r114325 r127197  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id$
    23
     
    45
    56name                    clamav-server
    6 version                 0.97.6
     7version                 0.98.4
    78homepage                http://www.clamav.net/
    89categories              sysutils
     
    6061}
    6162
    62 notes "******************************************************
    63 * To configure clamd and freshclam look for the following files
    64 * ${prefix}/etc/clamd.conf
    65 * ${prefix}/etc/freshclam.conf
    66 **
    67 * If these files do not exist copy do the following to copy these files into place
    68 cp ${prefix}/etc/example-clamd.conf ${prefix}/etc/clamd.conf
    69 cp ${prefix}/etc/example-freshclam.conf ${prefix}/etc/freshclam.conf
    70 **
    71 * Alter/Add the following lines to your ${prefix}/etc/clamd.conf
    72 * Comment out 'Example' near the top like so '#Example'
    73 * LogFile ${logPath}/clamd.log
    74 * PidFile ${runPath}/clamd.pid
    75 * LocalSocket ${runPath}/clamd.socket
    76 * Foreground yes
    77 **
    78 * Alter/Add the following lines to your ${prefix}/etc/freshclam.conf
    79 * Comment out 'Example' near the top like so '#Example'
    80 * UpdateLogFile ${logPath}/freshclam.log
    81 * PidFile ${runPath}/freshclam.pid
    82 * NotifyClamd ${prefix}/etc/clamd.conf
    83 **
    84 * Two launchd startup items have been installed
    85 **
    86 * To load clamd and freshclam do the following
    87 launchctl load -w /Library/LaunchDaemons/org.macports.clamd.plist
    88 launchctl load -w /Library/LaunchDaemons/org.macports.freshclam.plist
    89 **
    90 * To unload clamd and freshclam do the following
    91 launchctl unload -w /Library/LaunchDaemons/org.macports.clamd.plist
    92 launchctl unload -w /Library/LaunchDaemons/org.macports.freshclam.plist
    93 **
    94 * To try things out do
    95 freshclam
    96 * If all is well you should see your clamav database being updated
    97 ******************************************************"
     63post-activate {
     64    if {![file exists ${prefix}/etc/clamd.conf]} {
     65        copy ${prefix}/etc/clamd.conf.sample \
     66            ${prefix}/etc/clamd.conf
     67        reinplace "s,#Foreground,Foreground," \
     68            ${prefix}/etc/clamd.conf
     69    }
     70    if {![file exists ${prefix}/etc/freshclam.conf]} {
     71        copy ${prefix}/etc/freshclam.conf.sample \
     72            ${prefix}/etc/freshclam.conf
     73        reinplace "s,#Foreground,Foreground," \
     74            ${prefix}/etc/freshclam.conf
     75    }
     76}
     77
     78notes "
     79To configure clamd and freshclam look for the following files:
     80    ${prefix}/etc/clamd.conf
     81    ${prefix}/etc/freshclam.conf
     82
     83If these files do not exist you can copy the sample conf files into place:
     84    sudo cp ${prefix}/etc/clamd.conf.sample ${prefix}/etc/clamd.conf
     85    sudo cp ${prefix}/etc/freshclam.conf.sample ${prefix}/etc/freshclam.conf
     86
     87Edit ${prefix}/etc/clamd.conf to your liking, example:
     88# Comment out 'Example' near the top if it exists
     89    #Example
     90    LogFile ${logPath}/clamd.log
     91    PidFile ${runPath}/clamd.pid
     92    LocalSocket ${runPath}/clamd.socket
     93    Foreground yes
     94
     95Edit ${prefix}/etc/freshclam.conf to your liking, example:
     96# Comment out 'Example' near the top if it exists
     97    #Example
     98    UpdateLogFile ${logPath}/freshclam.log
     99    PidFile ${runPath}/freshclam.pid
     100    NotifyClamd ${prefix}/etc/clamd.conf
     101
     102Two launchd startup items have been installed.
     103
     104To load clamd and freshclam do the following:
     105    sudo launchctl load -w /Library/LaunchDaemons/org.macports.clamd.plist
     106    sudo launchctl load -w /Library/LaunchDaemons/org.macports.freshclam.plist
     107
     108To unload clamd and freshclam do the following:
     109    sudo launchctl unload -w /Library/LaunchDaemons/org.macports.clamd.plist
     110    sudo launchctl unload -w /Library/LaunchDaemons/org.macports.freshclam.plist
     111
     112To try things out do
     113    sudo freshclam
     114
     115If all is well you should see your clamav database being updated
     116"
    98117
    99118livecheck.type    regex
Note: See TracChangeset for help on using the changeset viewer.