#!/bin/sh
# Copyright (c) 2014-2019 Algo Communication Products Ltd.

# reset configuration to factory default

DEF_CONF=/opt/algo/info/default.conf
USER_CONF=/opt/algo/config/user.conf

mkdir -p /opt/algo/config
if [ -f $USER_CONF ]; then
	if diff $DEF_CONF $USER_CONF > /dev/null; then
		echo already default
	else
		cp $DEF_CONF $USER_CONF
		sync
	fi
else
	cp $DEF_CONF $USER_CONF
	sync
fi
