View | Details | Raw Unified | Return to bug 246822 | Differences between
and this patch

Collapse All | Expand All

(-)wazuh-agent/files/wazuh-agent.in (+62 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: wazuh_agent
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# to enable this service:
11
# wazuh_agent_enable (bool):	Set to NO by default.
12
# 				Set it to YES to enable Wazuh Agent.
13
#
14
15
. /etc/rc.subr
16
17
name="wazuh_agent"	# How the service will be invoked from service
18
rcvar="${name}_enable" 	# The variable in rc.conf that will allow this service to run
19
20
load_rc_config $name 	# Loads the config file, if relevant.
21
22
: ${wazuh_agent_enable:="NO"}
23
24
command="/var/ossec/bin/ossec-control"
25
extra_commands="status"
26
27
start_cmd="wazuh_agent_start"
28
stop_cmd="wazuh_agent_stop"
29
status_cmd="wazuh_agent_status"
30
31
wazuh_agent_start() {
32
	echo -n "Starting Wazuh: "
33
	${command} start > /dev/null
34
	RETVAL=$?
35
	if [ $RETVAL -eq 0 ]; then
36
		echo success
37
	else
38
		echo failure
39
	fi
40
	echo
41
	return $RETVAL
42
}
43
44
wazuh_agent_stop() {
45
	echo -n "Stopping Wazuh: "
46
	${command} stop > /dev/null
47
	RETVAL=$?
48
	if [ $RETVAL -eq 0 ]; then
49
		echo success
50
	else
51
		echo failure
52
	fi
53
	echo
54
	return $RETVAL
55
}
56
57
wazuh_agent_status() {
58
        ${command} status
59
}
60
61
run_rc_command "$@"
62
(-)wazuh-agent/Makefile (+2 lines)
Lines 32-37 Link Here
32
		${WRKSRC}/wodles/oscap/oscap.py \
32
		${WRKSRC}/wodles/oscap/oscap.py \
33
		${WRKSRC}/active-response/*.sh
33
		${WRKSRC}/active-response/*.sh
34
34
35
USE_RC_SUBR=	${PORTNAME}-agent
36
35
USERS=		ossec ossecm ossecr
37
USERS=		ossec ossecm ossecr
36
GROUPS=		ossec
38
GROUPS=		ossec
37
39
(-)wazuh-agent/pkg-message (+8 lines)
Line 0 Link Here
1
2
********************************************************************************
3
You must edit /var/ossec/etc/ossec.conf.sample for your setup, and 
4
follow the other directions for wazuh client configuration at:
5
https://documentation.wazuh.com/3.12/user-manual/reference/ossec-conf/index.html
6
********************************************************************************
7
8

Return to bug 246822