aboutsummaryrefslogtreecommitdiff
path: root/security/ossec-hids-local-config/files/merge-config.sh.in
blob: a7939f7d4bee671cecf23ef75fdce3c1bc4c19fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

# This script is part of FreeBSD port - report any issues to the port MAINTAINER

ossec_type="%%OSSEC_TYPE%%"
ossec_home="%%OSSEC_HOME%%"
ossec_rc="%%OSSEC_RC%%"

ACTION=$1
USER=$2
IP=$3

LOCAL=`dirname $0`;
cd $LOCAL
cd ../../tmp

# Logging the call
echo "`date` $0 $1 $2 $3 $4 $5" >> "${ossec_home}/logs/active-responses.log"

case ${ACTION} in
    add)
        "${ossec_rc}" merge_config
        exit 0
        ;;
    delete)
        exit 0
        ;;
    *)
        echo "$0: invalid action: ${ACTION}"
        exit 1
        ;;
esac