mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/clamav: move to NAME_setup use
Fiddle with the freshclam script to use the rc system so that setup.sh is invoked implicity. Restart seems more reasonable than an opportunistic start. PR: https://github.com/opnsense/core/issues/5917
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= clamav
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_COMMENT= Antivirus engine for detecting malicious threats
|
||||
PLUGIN_DEPENDS= clamav
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
@@ -37,7 +37,7 @@ elif pgrep -qF ${PIDFILE} 2> /dev/null; then
|
||||
elif [ -z "${COMMAND}" ]; then
|
||||
echo "missing"
|
||||
else
|
||||
daemon -f -p ${PIDFILE} freshclam --quiet
|
||||
daemon -f -p ${PIDFILE} /usr/local/etc/rc.d/clamav-freshclam restart
|
||||
echo "starting"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[start]
|
||||
command:
|
||||
/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh;
|
||||
/usr/local/etc/rc.d/clamav-freshclam start;
|
||||
/usr/local/etc/rc.d/clamav-clamd start
|
||||
parameters:
|
||||
@@ -17,7 +16,6 @@ message:stopping ClamAV
|
||||
|
||||
[restart]
|
||||
command:
|
||||
/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh;
|
||||
/usr/local/etc/rc.d/clamav-freshclam restart;
|
||||
/usr/local/etc/rc.d/clamav-clamd restart
|
||||
parameters:
|
||||
@@ -31,9 +29,7 @@ type:script_output
|
||||
message:request ClamAV status
|
||||
|
||||
[freshclam]
|
||||
command:
|
||||
/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh;
|
||||
/usr/local/opnsense/scripts/OPNsense/ClamAV/freshclam.sh
|
||||
command:/usr/local/opnsense/scripts/OPNsense/ClamAV/freshclam.sh
|
||||
parameters:%s
|
||||
type:script_output
|
||||
message:Check or install signatures
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.clamav.general.enabled') and OPNsense.clamav.general.enabled == '1' %}
|
||||
clamav_clamd_var_script="/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh"
|
||||
clamav_clamd_setup="/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh"
|
||||
clamav_clamd_enable="YES"
|
||||
{% else %}
|
||||
clamav_clamd_enable="NO"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.clamav.general.fc_enabled') and OPNsense.clamav.general.fc_enabled == '1' %}
|
||||
clamav_freshclam_var_script="/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh"
|
||||
clamav_freshclam_setup="/usr/local/opnsense/scripts/OPNsense/ClamAV/setup.sh"
|
||||
clamav_freshclam_enable="YES"
|
||||
{% else %}
|
||||
clamav_freshclam_enable="NO"
|
||||
|
||||
Reference in New Issue
Block a user