#!/bin/sh

ossec_home="%%OSSEC_HOME%%"
ar_conf="${ossec_home}/etc/shared/ar.conf"
merged_mg="${ossec_home}/etc/shared/merged.mg"
client_keys="${ossec_home}/etc/client.keys"
local_time="${ossec_home}/etc/localtime"
resolv_conf="${ossec_home}/etc/resolv.conf"

if [ "$2" == "DEINSTALL"  ]; then
    if [ ! -s "${client_keys}" ]; then
        rm -f "${client_keys}"
    fi
    rm -f "${ar_conf}" "${merged_mg}" "${local_time}" "${resolv_conf}"
fi
