OP#785 initial commit

This commit is contained in:
2026-09-22 11:54:36 +02:00
parent ff9f094650
commit 56c9f21844
29 changed files with 119 additions and 3522 deletions

View File

@@ -1,10 +1,10 @@
## clamav_cd::init.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class initializes the clamav_cd Module.
## confdroid_clamav::init.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class initializes the confdroid_clamav Module.
##############################################################################
class clamav_cd {
include clamav_cd::params
class confdroid_clamav {
include confdroid_clamav::params
resources { 'firewall':
purge => true,

View File

@@ -1,13 +1,13 @@
## clamav_cd::main::config.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_clamav::main::config.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all aspects of configuring the module logic for
# clamav_cd.
# confdroid_clamav.
##############################################################################
class clamav_cd::main::config (
class confdroid_clamav::main::config (
) inherits clamav_cd::params {
include clamav_cd::main::service
) inherits confdroid_clamav::params {
include confdroid_clamav::main::service
# Ensure the SELinux boolean antivirus_can_scan_system is enabled if disabled
exec { 'enable_antivirus_can_scan_system':

View File

@@ -1,12 +1,12 @@
## clamav_cd::main::dirs.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages all directories required for clamav_cd.
## confdroid_clamav::main::dirs.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all directories required for confdroid_clamav.
###############################################################################
class clamav_cd::main::dirs (
class confdroid_clamav::main::dirs (
) inherits clamav_cd::params {
require clamav_cd::main::install
) inherits confdroid_clamav::params {
require confdroid_clamav::main::install
# config.d dir
file { $cv_config_d_dir:

View File

@@ -1,12 +1,12 @@
## clamav_cd::main::files.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages all configuration files required for clamav_cd.
## confdroid_clamav::main::files.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all configuration files required for confdroid_clamav.
##############################################################################
class clamav_cd::main::files (
class confdroid_clamav::main::files (
) inherits clamav_cd::params {
require clamav_cd::main::dirs
) inherits confdroid_clamav::params {
require confdroid_clamav::main::dirs
# clamd config file
file { $cv_clamd_config_file:

View File

@@ -1,12 +1,12 @@
## clamav_cd ::main::install.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_clamav ::main::install.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manage all aspects of installing binaries required for
# clamav_cd
# confdroid_clamav
###############################################################################
class clamav_cd::main::install (
class confdroid_clamav::main::install (
) inherits clamav_cd::params {
) inherits confdroid_clamav::params {
require confdroid_resources::main::epel
package { $reqpackages:

View File

@@ -1,12 +1,12 @@
## clamav_cd::main::service.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages the service(s) for clamav_cd.
## confdroid_clamav::main::service.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages the service(s) for confdroid_clamav.
#############################################################################
class clamav_cd::main::service (
class confdroid_clamav::main::service (
) inherits clamav_cd::params {
require clamav_cd::main::files
) inherits confdroid_clamav::params {
require confdroid_clamav::main::files
if $cv_enable_clamd == true {
service { $cv_service:

View File

@@ -1,7 +1,7 @@
## clamav_cd::params.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class holds all parameters for the clamav_cd module and is
## confdroid_clamav::params.pp
# Module name: confdroid_clamav
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class holds all parameters for the confdroid_clamav module and is
# inherited by all classes except defines.
# @param [Array] reqpackages List of packages to install.
# @param [String] pkg_ensure
@@ -36,7 +36,7 @@
# @param [Boolean] cv_enable_freshclam whether to enable the freshclam service
# @param [Boolean] cv_enable_clamd whether to enable the clamd service
##############################################################################
class clamav_cd::params (
class confdroid_clamav::params (
# installation
Array $reqpackages = ['clamav','clamd','s-nail'],
@@ -75,15 +75,15 @@ class clamav_cd::params (
# files
$cv_clamd_config_file = "${cv_config_d_dir}/scan.conf"
$cv_clamd_config_erb = 'clamav_cd/scan_conf.erb'
$cv_clamd_config_erb = 'confdroid_clamav/scan_conf.erb'
$cv_freshclam_file = '/etc/freshclam.conf'
$cv_freshclam_erb = 'clamav_cd/freshclam_conf.erb'
$cv_freshclam_erb = 'confdroid_clamav/freshclam_conf.erb'
$cv_freshclam_svc = '/usr/lib/systemd/system/freshclam.service'
$cv_freshclam_svc_erb = 'clamav_cd/freshclam_svc.erb'
$cv_freshclam_svc_erb = 'confdroid_clamav/freshclam_svc.erb'
$cv_shell_script = "${cv_config_d_dir}/scan.sh"
$cv_shell_script_erb = 'clamav_cd/scan.sh.erb'
$cv_shell_script_erb = 'confdroid_clamav/scan.sh.erb'
# includes must be last
include clamav_cd::main::config
include confdroid_clamav::main::config
}