#!/bin/sh

# Load ipmodule variables
. /opt/gira/share/devicestack/ipmodule-vars

pidof devicestack > /dev/null
RUNNING=$?

if [ "${RUNNING}" != 0 ]
then
	printf "Removing configuration files ... "
	rm -f "${NETWORK_CFG_FILE}"
	rm -f "${APPCONFIG_FILE}"
	rm -f "${DSCONFIG_FILE}"
	rm -rf "${COSTOM_CHANNEL_DIR}" 
	rm -rf "${CUSTOM_PROJECT_DEFINITION_DIR}" 
	printf "done.\\n"
else
	printf "Devicestack is running, skipping configuration-reset!\\n"
fi

exit 0
