#!/bin/bash

# resets the HTC apps, wiping everything

HTC_INIT=/etc/init.d/htc # init script to stop/start htc apps and wifiupdate (WDM manifest update application)
HTC_DIR=/usr/local/htc

# stop the apps and wifiupdate
${HTC_INIT} stop

# delete any files
find ${HTC_DIR} -type f -delete

# specific deletions
rm -rf ${HTC_DIR}/media
rm -rf ${HTC_DIR}/database/*
rm -rf ${HTC_DIR}/readwrite/*

# start the apps and wifiupdate
${HTC_INIT} start

exit 0

