FreeBSD Bugzilla – Attachment 215025 Details for
Bug 246822
security/wazuh-agent: port doesn't have rc script for starting agent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
wazuh-agent-rc-script.patch
file_246822.txt (text/plain), 2.42 KB, created by
Felipe Zipitria
on 2020-05-29 14:27:36 UTC
(
hide
)
Description:
wazuh-agent-rc-script.patch
Filename:
MIME Type:
Creator:
Felipe Zipitria
Created:
2020-05-29 14:27:36 UTC
Size:
2.42 KB
patch
obsolete
>diff -ruN wazuh-agent.orig/files/wazuh-agent.in wazuh-agent/files/wazuh-agent.in >--- wazuh-agent.orig/files/wazuh-agent.in 1969-12-31 16:00:00.000000000 -0800 >+++ wazuh-agent/files/wazuh-agent.in 2020-05-29 07:15:21.904423000 -0700 >@@ -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 "$@" >+ >diff -ruN wazuh-agent.orig/Makefile wazuh-agent/Makefile >--- wazuh-agent.orig/Makefile 2020-05-07 06:17:34.000000000 -0700 >+++ wazuh-agent/Makefile 2020-05-29 07:11:08.812856000 -0700 >@@ -32,6 +32,8 @@ > ${WRKSRC}/wodles/oscap/oscap.py \ > ${WRKSRC}/active-response/*.sh > >+USE_RC_SUBR= ${PORTNAME}-agent >+ > USERS= ossec ossecm ossecr > GROUPS= ossec > >diff -ruN wazuh-agent.orig/pkg-message wazuh-agent/pkg-message >--- wazuh-agent.orig/pkg-message 1969-12-31 16:00:00.000000000 -0800 >+++ wazuh-agent/pkg-message 2020-05-29 07:20:28.937817000 -0700 >@@ -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 >+******************************************************************************** >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246822
:
214993
| 215025