Date: Thu, 30 Jul 2020 16:16:02 +0000 (UTC) From: Kirill Ponomarev <krion@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r543803 - in head/security/wazuh-agent: . files Message-ID: <202007301616.06UGG2KX018668@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: krion Date: Thu Jul 30 16:16:02 2020 New Revision: 543803 URL: https://svnweb.freebsd.org/changeset/ports/543803 Log: Add RC script PR: 246822 Approved by: maintainer Added: head/security/wazuh-agent/files/ head/security/wazuh-agent/files/wazuh-agent.in (contents, props changed) head/security/wazuh-agent/pkg-message (contents, props changed) Modified: head/security/wazuh-agent/Makefile Modified: head/security/wazuh-agent/Makefile ============================================================================== --- head/security/wazuh-agent/Makefile Thu Jul 30 16:04:23 2020 (r543802) +++ head/security/wazuh-agent/Makefile Thu Jul 30 16:16:02 2020 (r543803) @@ -3,6 +3,7 @@ PORTNAME= wazuh DISTVERSIONPREFIX= v DISTVERSION= 3.13.1 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= https://packages.wazuh.com/deps/3.13/ PKGNAMESUFFIX= -agent @@ -31,6 +32,8 @@ SHEBANG_FILES= ${WRKSRC}/contrib/util.sh \ ${WRKSRC}/src/init/ossec-client.sh \ ${WRKSRC}/wodles/oscap/oscap.py \ ${WRKSRC}/active-response/*.sh + +USE_RC_SUBR= ${PORTNAME}-agent USERS= ossec ossecm ossecr GROUPS= ossec Added: head/security/wazuh-agent/files/wazuh-agent.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/wazuh-agent/files/wazuh-agent.in Thu Jul 30 16:16:02 2020 (r543803) @@ -0,0 +1,62 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: wazuh_agent +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# wazuh_agent_enable (bool): Set to NO by default. +# Set it to YES to enable Wazuh Agent. +# + +. /etc/rc.subr + +name="wazuh_agent" # How the service will be invoked from service +rcvar="${name}_enable" # The variable in rc.conf that will allow this service to run + +load_rc_config $name # Loads the config file, if relevant. + +: ${wazuh_agent_enable:="NO"} + +command="/var/ossec/bin/ossec-control" +extra_commands="status" + +start_cmd="wazuh_agent_start" +stop_cmd="wazuh_agent_stop" +status_cmd="wazuh_agent_status" + +wazuh_agent_start() { + echo -n "Starting Wazuh: " + ${command} start > /dev/null + RETVAL=$? + if [ $RETVAL -eq 0 ]; then + echo success + else + echo failure + fi + echo + return $RETVAL +} + +wazuh_agent_stop() { + echo -n "Stopping Wazuh: " + ${command} stop > /dev/null + RETVAL=$? + if [ $RETVAL -eq 0 ]; then + echo success + else + echo failure + fi + echo + return $RETVAL +} + +wazuh_agent_status() { + ${command} status +} + +run_rc_command "$@" + Added: head/security/wazuh-agent/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/wazuh-agent/pkg-message Thu Jul 30 16:16:02 2020 (r543803) @@ -0,0 +1,8 @@ +************************************************************************************ +* * +* You must edit /var/ossec/etc/ossec.conf.sample for your setup, and * +* follow the other directions for wazuh client configuration at: * +* https://documentation.wazuh.com/3.12/user-manual/reference/ossec-conf/index.html * +* * +************************************************************************************ +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007301616.06UGG2KX018668>