#!/bin/sh
[ -n "${IPKG_INSTROOT}" ] || {
  rm -rf /etc/netflow/v2board
  rm -f /etc/netflow/.dev_salt
  rm -f /etc/config/netflow
  rm -f /etc/config/netflow-opkg

  CRON_FILE="/etc/crontabs/root"
  if [ -f "$CRON_FILE" ]; then
    sed -i '/update_geodata/d' "$CRON_FILE"
    /etc/init.d/cron restart 2>/dev/null
  fi

  uci delete netflow 2>/dev/null
  uci commit netflow 2>/dev/null

  rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
}
exit 0
