adds log variables
This commit is contained in:
@@ -24,12 +24,44 @@
|
|||||||
# @param [string] pkg_ensure
|
# @param [string] pkg_ensure
|
||||||
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
||||||
# to choose, i.e. `latest` or `present`.
|
# to choose, i.e. `latest` or `present`.
|
||||||
|
# @param [string] cv_logfile where to log messages for the clamd service.
|
||||||
|
# @param [string] cv_logfileunlock whether log file should be locked for
|
||||||
|
# writing -the lock protects againstrunning clamd multiple times
|
||||||
|
# @param [string] cv_logfilemaxsize themax size for the logfile. This also
|
||||||
|
# enables logrotation.
|
||||||
|
# @param [string] cv_logtime Whether to log the time with each message.
|
||||||
|
# @param [string] cv_logclean whether to log clean files. Useful in debugging
|
||||||
|
# but drastically increases the log size.
|
||||||
|
# @param [string] cv_logsyslog Use system logger (can work together with
|
||||||
|
# LogFile).
|
||||||
|
# @param [string] cv_logfacility type of syslog messages - please refer to
|
||||||
|
# 'man syslog'for facility names
|
||||||
|
# @param [string] cv_logverbose Whether to log verbose.
|
||||||
|
# @param [string] cv_logrotate whether to enable log rotation. Always enabled
|
||||||
|
# when LogFileMaxSize is enabled.
|
||||||
|
# @param [string] cv_preludeenable whether to enable prelude output.
|
||||||
|
# @param [string] cv_preludeanalyzername name of the analyzer used by
|
||||||
|
# prelude-admin.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class cd_clamav::params (
|
class cd_clamav::params (
|
||||||
|
|
||||||
# installation
|
# installation
|
||||||
$reqpackages = ['clamav','clamav-update','clamd'],
|
$reqpackages = ['clamav','clamav-update','clamd'],
|
||||||
$pkg_ensure = 'present',
|
$pkg_ensure = 'present',
|
||||||
|
|
||||||
|
# clamd
|
||||||
|
$cv_logfile = '/var/log/clamd.scan',
|
||||||
|
$cv_logfileunlock = 'no'
|
||||||
|
$cv_logfilemaxsize = '2M',
|
||||||
|
$cv_logtime = 'yes',
|
||||||
|
$cv_logclean = 'no',
|
||||||
|
$cv_logsyslog = 'yes',
|
||||||
|
$cv_logfacility = 'LOG_MAIL',
|
||||||
|
$cv_logverbose = 'no',
|
||||||
|
$cv_logrotate = 'yes',
|
||||||
|
$cv_preludeenable = 'no',
|
||||||
|
$cv_preludeanalyzername = 'ClamAV',
|
||||||
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,61 +3,19 @@
|
|||||||
## original available under https://confdroid.com/2019/12/cd_clamav-scan-conf/
|
## original available under https://confdroid.com/2019/12/cd_clamav-scan-conf/
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Comment or remove the line below.
|
LogFile <%= @cv_logfile -%>
|
||||||
Example
|
LogFileUnlock <%= @cv_logfileunlock %>
|
||||||
|
LogFileMaxSize <%= @cv_logfilemaxsize %>
|
||||||
# Uncomment this option to enable logging.
|
LogTime <%= @cv_logtime %>
|
||||||
# LogFile must be writable for the user running daemon.
|
LogClean <%= @cv_logclean %>
|
||||||
# A full path is required.
|
LogSyslog <%= @cv_logsyslog %>
|
||||||
# Default: disabled
|
LogFacility <%= @cv_logfacility %>
|
||||||
#LogFile /var/log/clamd.scan
|
LogVerbose <%= @cv_logverbose %>
|
||||||
|
LogRotate <%= @cv_logrotate %>
|
||||||
# By default the log file is locked for writing - the lock protects against
|
|
||||||
# running clamd multiple times (if want to run another clamd, please
|
|
||||||
# copy the configuration file, change the LogFile variable, and run
|
|
||||||
# the daemon with --config-file option).
|
|
||||||
# This option disables log file locking.
|
|
||||||
# Default: no
|
|
||||||
#LogFileUnlock yes
|
|
||||||
|
|
||||||
# Maximum size of the log file.
|
|
||||||
# Value of 0 disables the limit.
|
|
||||||
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
|
|
||||||
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
|
|
||||||
# in bytes just don't use modifiers. If LogFileMaxSize is enabled, log
|
|
||||||
# rotation (the LogRotate option) will always be enabled.
|
|
||||||
# Default: 1M
|
|
||||||
#LogFileMaxSize 2M
|
|
||||||
|
|
||||||
# Log time with each message.
|
|
||||||
# Default: no
|
|
||||||
#LogTime yes
|
|
||||||
|
|
||||||
# Also log clean files. Useful in debugging but drastically increases the
|
|
||||||
# log size.
|
|
||||||
# Default: no
|
|
||||||
#LogClean yes
|
|
||||||
|
|
||||||
# Use system logger (can work together with LogFile).
|
|
||||||
# Default: no
|
|
||||||
LogSyslog yes
|
|
||||||
|
|
||||||
# Specify the type of syslog messages - please refer to 'man syslog'
|
|
||||||
# for facility names.
|
|
||||||
# Default: LOG_LOCAL6
|
|
||||||
#LogFacility LOG_MAIL
|
|
||||||
|
|
||||||
# Enable verbose logging.
|
|
||||||
# Default: no
|
|
||||||
#LogVerbose yes
|
|
||||||
|
|
||||||
# Enable log rotation. Always enabled when LogFileMaxSize is enabled.
|
|
||||||
# Default: no
|
|
||||||
#LogRotate yes
|
|
||||||
|
|
||||||
# Enable Prelude output.
|
# Enable Prelude output.
|
||||||
# Default: no
|
# Default: no
|
||||||
#PreludeEnable yes
|
PreludeEnable yes
|
||||||
#
|
#
|
||||||
# Set the name of the analyzer used by prelude-admin.
|
# Set the name of the analyzer used by prelude-admin.
|
||||||
# Default: ClamAV
|
# Default: ClamAV
|
||||||
|
|||||||
Reference in New Issue
Block a user