#!/bin/sh

# Shutdown agent
#---------------

logger -p local6.notice -t installer "app-netify-fwa-core - stopping Netify firewall agent"
service netify-fwa stop >/dev/null 2>&1

# Remove state file
#------------------

if [ -e /var/lib/netify-fwa/state.dat ]; then
    TIMESTAMP=`date "+%b-%d-%Y-%T"`
    mv /var/lib/netify-fwa/state.dat /var/lib/netify-fwa/state.dat.$TIMESTAMP
fi

# Restart firewall
#-----------------

/sbin/service firewall restart >/dev/null 2>&1
