Skip to content

Commit

Permalink
Debian files for Wazuh 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BraulioV committed Feb 19, 2018
1 parent 9f9b71e commit afb4833
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 7 deletions.
4 changes: 2 additions & 2 deletions debs/generate_wazuh_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# CONFIGURATION VARIABLES
#

wazuh_major='3.1'
wazuh_version='3.1.0'
wazuh_major='3.2'
wazuh_version='3.2.0'
# source_file="${wazuh_major}.zip"
source_file="v${wazuh_version}.zip"

Expand Down
7 changes: 7 additions & 0 deletions debs/wazuh-agent/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
wazuh-agent (3.2.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/

-- Wazuh, Inc <[email protected]> Thu, 11 Dec 2017 15:19:24 +0000


wazuh-agent (3.1.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/
Expand Down
1 change: 1 addition & 0 deletions debs/wazuh-agent/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Upstream Authors:
[email protected]
[email protected]
[email protected]
[email protected]

Copyright:

Expand Down
3 changes: 3 additions & 0 deletions debs/wazuh-agent/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ case "$1" in

# Service
if [ -f /etc/init.d/wazuh-agent ]; then
if [ -d /run/systemd/system ]; then
systemctl enable wazuh-agent > /dev/null 2>&1
fi
update-rc.d wazuh-agent defaults > /dev/null 2>&1
fi
if cat ${DIR}etc/ossec.conf | grep -o -P '(?<=<server-ip>).*(?=</server-ip>)' | grep -E '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' > /dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion debs/wazuh-agent/debian/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

case "$1" in
install|upgrade)

if [ -z "$2" ]
then
if [ -f ${DIR}/etc/ossec.conf ]; then
Expand Down
7 changes: 7 additions & 0 deletions debs/wazuh-api/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
wazuh-api (3.2.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/

-- Wazuh, Inc <[email protected]> Thu, 11 Dec 2017 15:19:24 +0000


wazuh-api (3.1.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/
Expand Down
2 changes: 1 addition & 1 deletion debs/wazuh-api/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Homepage: http://www.wazuh.com

Package: wazuh-api
Architecture: any
Depends: ${shlibs:Depends}, npm, nodejs (>= 4.6.1), wazuh-manager (>= 3.0.0), curl
Depends: ${shlibs:Depends}, npm, nodejs (>= 4.6.1), wazuh-manager (>= 3.2.0), curl
Description: Wazuh API is an open source RESTful API to interact with OSSEC from your own application or with a simple web browser or tools like cURL.
1 change: 1 addition & 0 deletions debs/wazuh-api/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Upstream Authors:
[email protected]
[email protected]
[email protected]
[email protected]

Copyright:

Expand Down
7 changes: 5 additions & 2 deletions debs/wazuh-api/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ case "$1" in
fi

if [ -x /etc/init.d/wazuh-api ]; then
if [ -d /run/systemd/system ]; then
systemctl enable wazuh-api > /dev/null 2>&1
fi
update-rc.d wazuh-api defaults > /dev/null 2>&1
fi

Expand Down Expand Up @@ -62,9 +65,9 @@ case "$1" in
rm -r ${OSSEC_HIDS_TMP_DIR}
fi
if [ -n "$(ps -e | egrep ^\ *1\ .*systemd$)" ]; then
systemctl daemon-reload > /dev/null 2>&1
systemctl daemon-reload > /dev/null 2>&1
systemctl restart wazuh-api.service > /dev/null 2>&1

fi
if [ -n "$(ps -e | egrep ^\ *1\ .*init$)" ]; then
service wazuh-api restart > /dev/null 2>&1
Expand Down
7 changes: 7 additions & 0 deletions debs/wazuh-manager/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
wazuh-manager (3.2.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/

-- Wazuh, Inc <[email protected]> Thu, 11 Dec 2017 15:19:24 +0000


wazuh-manager (3.1.0) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/
Expand Down
1 change: 1 addition & 0 deletions debs/wazuh-manager/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Upstream Authors:
[email protected]
[email protected]
[email protected]
[email protected]

Copyright:

Expand Down
11 changes: 10 additions & 1 deletion debs/wazuh-manager/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ case "$1" in

# Remove existing SQLite databases
rm -f ${DIR}var/db/global.db* || true
rm -f ${DIR}var/db/cluster.db* || true
rm -f ${DIR}var/db/.profile.db* || true
rm -f ${DIR}var/db/agents/* || true

Expand Down Expand Up @@ -133,7 +134,6 @@ case "$1" in
mv "${DIR}ossec/etc/shared/agent.conf" "${DIR}ossec/etc/shared/default/agent.conf "
fi


# For the etc dir
if [ -f /etc/localtime ]; then
cp -pL /etc/localtime ${DIR}etc/;
Expand Down Expand Up @@ -192,6 +192,9 @@ case "$1" in
touch ${DIR}etc/client.keys
touch ${DIR}etc/shared/default/*

chmod 770 /var/ossec/etc/lists
chmod 770 /var/ossec/etc/lists/amazon
chmod 660 /var/ossec/etc/lists/amazon/*

# Delete old service
if [ -e /etc/init.d/ossec ]; then
Expand All @@ -217,7 +220,13 @@ case "$1" in

# Service
if [ -x /etc/init.d/wazuh-manager ]; then
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl enable wazuh-manager > /dev/null 2>&1
fi

update-rc.d wazuh-manager defaults > /dev/null 2>&1

if ${DIR}bin/ossec-logtest -t 2>/dev/null ; then
service wazuh-manager restart
else
Expand Down
4 changes: 4 additions & 0 deletions debs/wazuh-manager/debian/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ case "$1" in
cp -p ${DIR}/etc/ossec.conf ${OSSEC_HIDS_TMP_DIR}/ossec.conf
fi

if [ -d ${DIR}/var/db/agents ]; then
rm -f ${DIR}/var/db/agents/*
fi

;;

abort-upgrade)
Expand Down

0 comments on commit afb4833

Please sign in to comment.