#!/bin/sh

# add something which happens before upgrade

directory_base="/var/ossec"

if [ -f /var/ossec/var/run/wazuh-execd-*.pid ]; then
    touch ${directory_base}/tmp/wazuh.restart
    ${directory_base}/bin/wazuh-control stop > /dev/null 2>&1
fi

cp -a ${directory_base}/etc ${directory_base}/tmp/

exit 0
