Agregando agente de wazuh

This commit is contained in:
Jesus Martin Ortega Martinez 2023-11-17 22:16:24 -06:00
parent be2b12304c
commit 71962f00af
Signed by: jortega
GPG Key ID: 1B93E6A766CD229D
3 changed files with 101 additions and 0 deletions

35
wazuh-agent/.SRCINFO Normal file
View File

@ -0,0 +1,35 @@
pkgbase = wazuh-agent
pkgdesc = Wazuh Dashboard for Arch Linux
pkgver = 4.6.0
pkgrel = 1
url = https://wazuh.com/
install = wazuh-agent.install
arch = x86_64
license = gpl2
depends = curl
depends = gcc
depends = make
depends = sudo
depends = wget
depends = expect
depends = gnupg
depends = perl-base
depends = perl
depends = fakeroot
depends = python
depends = brotli
depends = automake
depends = autoconf
depends = libtool
depends = gawk
depends = libsigsegv
depends = nodejs
depends = base-devel
depends = inetutils
depends = cmake
optdepends = lsb-release
source = https://packages.wazuh.com/4.x/yum/wazuh-agent-4.6.0-1.x86_64.rpm
validpgpkeys = 9E646BB0630C8FD18ACD15541B93E6A766CD229D
sha256sums = efd02f25b76bce5d77976a8a7121a8009edeac32545e5a762e47dcf3182b9d34
pkgname = wazuh-agent

57
wazuh-agent/PKGBUILD Normal file
View File

@ -0,0 +1,57 @@
# Maintainer: Jesus Martin Ortega Martinez (madara125) <martin.ortega.arashi@gmail.com><jortega@condorbs.net>
# Contribuidor: Kevin Muñoz <kmunoz@condorbs.net>
pkgname=wazuh-agent
pkgver=4.6.0
_remRevision=1
_prodver=${pkgver}-${_remRevision}
pkgrel=1
pkgdesc="Wazuh Dashboard for Arch Linux"
arch=('x86_64')
url="https://wazuh.com/"
license=('gpl2')
depends=(
'curl'
'gcc'
'make'
'sudo'
'wget'
'expect'
'gnupg'
'perl-base'
'perl'
'fakeroot'
'python'
'brotli'
'automake'
'autoconf'
'libtool'
'gawk'
'libsigsegv'
'nodejs'
'base-devel'
'inetutils'
'cmake'
);
optdepends=(
'lsb-release'
);
validpgpkeys=('9E646BB0630C8FD18ACD15541B93E6A766CD229D')
source=("https://packages.wazuh.com/4.x/yum/${pkgname}-${_prodver}.x86_64.rpm")
sha256sums=('efd02f25b76bce5d77976a8a7121a8009edeac32545e5a762e47dcf3182b9d34')
install=$pkgname.install
package() {
#change permissions
chmod -R +w "$srcdir/var/ossec"
#Setup
cd $pkgdir
mv $srcdir/etc .
mv $srcdir/usr .
mv $srcdir/var .
#Set systemd service file perms
chmod 644 $pkgdir/usr/lib/systemd/system/wazuh-agent.service
}

View File

@ -0,0 +1,9 @@
post_install()
{
echo "Visit https://documentation.wazuh.com/current/installation-guide/wazuh-agent/wazuh-agent-package-linux.html and follow the configure instructions, also, check https://documentation.wazuh.com/current/user-manual/deployment-variables/deployment-variables-linux.html for deployment vars, and https://documentation.wazuh.com/current/user-manual/agent-enrollment/index.html if you didn't follow wazu's installation guide
or, just run the next commands:
/var/ossec/bin/manage_agents -i <agent_key>
systemctl daemon-reload
systemctl enable wazuh-agent
systemctl start wazuh-agent"
}