mirror of
https://git.freebsd.org/ports.git
synced 2025-05-16 09:11:50 -04:00
security/ossec-hids-local: upgrade 3.1.0 -> 3.3.0 security/ossec-hids-local-config: upgrade 3.1.0 -> 3.3.0 - Added LUA option. Bundled Lua support is no longer compiled in by default PR: 237632 Submitted by: Dominik Lisiak <dominik.lisiak@bemsoft.pl> (maintainer) Relnotes: https://github.com/ossec/ossec-hids/releases/tag/3.3.0 https://github.com/ossec/ossec-hids/releases/tag/3.2.0
27 lines
622 B
Bash
27 lines
622 B
Bash
#!/bin/sh
|
|
|
|
ossec_home="%%OSSEC_HOME%%"
|
|
client_keys="${ossec_home}/etc/client.keys"
|
|
|
|
create_file() {
|
|
local path=$1
|
|
local owner=$2
|
|
local mode=$3
|
|
|
|
if [ ! -e "${path}" ]; then
|
|
touch "${path}" && chown ${owner} "${path}" && chmod ${mode} "${path}"
|
|
fi
|
|
}
|
|
|
|
if [ "$2" == "POST-INSTALL" ]; then
|
|
if [ -z "${USER}" ]; then
|
|
USER=$(id -un)
|
|
fi
|
|
|
|
pw usermod %%OSSEC_USER%% -d "${ossec_home}"
|
|
pw usermod ossecm -d "${ossec_home}"
|
|
pw usermod ossecr -d "${ossec_home}"
|
|
chown ${USER}:%%OSSEC_GROUP%% "${ossec_home}"
|
|
|
|
create_file "${client_keys}" ${USER}:%%OSSEC_GROUP%% 0640
|
|
fi
|