firmware/src/packages/fff/fff-gateway/files/etc/gateway.d/01-version

20 lines
548 B
Plaintext

configure() {
local expected_version=1
local config_version=$(uci -q get gateway.meta.config_version)
# check if gateway config exists
if ! uci -q show gateway > /dev/null; then
echo "ERROR: Gateway config could not be parsed or does not exist."
exit 1
fi
# check version of configuration
if [ "$config_version" != "$expected_version" ]; then
echo "ERROR: Invalid config version. Expected '$expected_version', got '$config_version'."
echo "Please check what has been changed and adjust your config appropriately."
exit 1
fi
}