2 # Shared variables and functions
3 # Author: Daniel B. Cid <daniel.cid@gmail.com>
4 # Last modification: Mar 03, 2006
8 ### Setting up variables
9 VERSION_FILE="./src/VERSION"
10 VERSION=`cat ${VERSION_FILE}`
11 LOCATION="./src/LOCATION"
15 # If whoami does not exist, try id
16 ls "`which whoami`" > /dev/null 2>&1
18 ME=`id | cut -d " " -f 1`
19 if [ "X${ME}" = "Xuid=0(root)" ]; then
23 ME=`whoami 2>/dev/null`
26 OSSEC_INIT="/etc/ossec-init.conf"
28 NAMESERVERS=`cat /etc/resolv.conf | grep "^nameserver" | cut -d " " -sf 2`
29 NAMESERVERS2=`cat /etc/resolv.conf | grep "^nameserver" | cut -sf 2`
33 DEFAULT_DIR=`grep DIR ${LOCATION} | cut -f2 -d\"`
34 INSTALLDIR="$DEFAULT_DIR";
38 # Internal definitions
39 NEWCONFIG="./etc/ossec.mc"
40 PRECONFIG="./etc/PRECONFIG"
43 TEMPLATE="./etc/templates"
48 SYSCHECK_TEMPLATE="./etc/templates/config/syscheck.template"
49 SYSLOG_TEMPLATE="./etc/templates/config/syslog-logs.template"
50 APACHE_TEMPLATE="./etc/templates/config/apache-logs.template"
51 SNORT_TEMPLATE="./etc/templates/config/snort-logs.template"
52 PGSQL_TEMPLATE="./etc/templates/config/pgsql-logs.template"
53 HOST_DENY_TEMPLATE="./etc/templates/config/ar-host-deny.template"
54 FIREWALL_DROP_TEMPLATE="./etc/templates/config/ar-firewall-drop.template"
55 DISABLE_ACCOUNT_TEMPLATE="./etc/templates/config/ar-disable-account.template"
56 ACTIVE_RESPONSE_TEMPLATE="./etc/templates/config/active-response.template"
57 ROUTENULL_TEMPLATE="./etc/templates/config/ar-routenull.template"
58 RULES_TEMPLATE="./etc/templates/config/rules.template"
62 OSSECMX="devmail.ossec.net mail is handled by 10 ossec.mooo.com."
63 OSSECMX2="devmail.ossec.net mail is handled (pri=10) by ossec.mooo.com"
64 OSSECMX3="devmail.ossec.net mail is handled by 10 ossec.mooo.COM."
67 PREDEF_FILE="./etc/preloaded-vars.conf"