mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/crowdsec 1.0.2: updated cron and log parsing (#3269)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= crowdsec
|
||||
PLUGIN_VERSION= 1.0.1
|
||||
PLUGIN_VERSION= 1.0.2
|
||||
PLUGIN_DEPENDS= crowdsec
|
||||
PLUGIN_COMMENT= Lightweight and collaborative security engine
|
||||
PLUGIN_MAINTAINER= marco@crowdsec.net
|
||||
|
||||
@@ -8,6 +8,12 @@ WWW: https://crowdsec.net/
|
||||
Plugin Changelog
|
||||
================
|
||||
|
||||
1.0.2
|
||||
|
||||
* updated cron job (reload only when there are updates), added small random delay
|
||||
* limit log collection to latest.log (requires 22.7+)
|
||||
* some javascript lint
|
||||
|
||||
1.0.1
|
||||
|
||||
* fixed live logs
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
SHELL=/bin/sh
|
||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
||||
#minute hour mday month wday who command
|
||||
0 1,13 * * * root /usr/local/opnsense/scripts/OPNsense/CrowdSec/hub-upgrade.sh
|
||||
0 1 * * * root (sleep $(jot -r 1 1 60); /usr/local/opnsense/scripts/OPNsense/CrowdSec/hub-upgrade.sh)
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
#
|
||||
|
||||
filenames:
|
||||
# ssh
|
||||
- /var/log/audit/*.log
|
||||
# web admin
|
||||
- /var/log/lighttpd/*.log
|
||||
# DO NOT EDIT - to add new datasources (log locations),
|
||||
# create new files in /usr/local/etc/crowdsec/acquis.d/
|
||||
#
|
||||
# collection: crowdsecurity/sshd
|
||||
- /var/log/audit/latest.log
|
||||
# collection: crowdsecurity/opnsense-gui (web admin)
|
||||
- /var/log/lighttpd/latest.log
|
||||
labels:
|
||||
type: syslog
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<model>
|
||||
<mount>//OPNsense/crowdsec/general</mount>
|
||||
<description>CrowdSec general configuration</description>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2</version>
|
||||
<items>
|
||||
|
||||
<agent_enabled type="BooleanField">
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{# SPDX-License-Identifier: MIT #}
|
||||
{# SPDX-FileCopyrightText: © 2021 CrowdSec <info@crowdsec.net> #}
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var data_get_map = {'frm_GeneralSettings':"/api/crowdsec/general/get"};
|
||||
@@ -22,7 +21,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
if(window.location.hash != "") {
|
||||
if(window.location.hash !== "") {
|
||||
$('a[href="' + window.location.hash + '"]').click()
|
||||
}
|
||||
$('.nav-tabs a').on('shown.bs.tab', function (e) {
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/local/bin/cscli --error hub update \
|
||||
&& /usr/local/bin/cscli --error hub upgrade
|
||||
test -x /usr/local/bin/cscli || exit 0
|
||||
|
||||
/usr/local/bin/cscli --error hub update
|
||||
|
||||
upgraded=$(/usr/local/bin/cscli --error hub upgrade)
|
||||
|
||||
if [ ! -e "/usr/local/etc/crowdsec/collections/opnsense.yaml" ]; then
|
||||
/usr/local/bin/cscli --error collections install crowdsecurity/opnsense
|
||||
fi
|
||||
|
||||
if service crowdsec enabled; then
|
||||
if ! service crowdsec status >/dev/null 2>&1; then
|
||||
service crowdsec start >/dev/null 2>&1 || :
|
||||
else
|
||||
service crowdsec reload >/dev/null 2>&1 || :
|
||||
if [ -n "$upgraded" ]; then
|
||||
if service crowdsec enabled; then
|
||||
if ! service crowdsec status >/dev/null 2>&1; then
|
||||
service crowdsec start >/dev/null 2>&1 || :
|
||||
else
|
||||
service crowdsec reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user