#!/bin/sh
# First-run initialization

mkdir -p /etc/mihomo/ui
chmod +x /usr/bin/mihomo 2>/dev/null

if ! uci -q get mihomo.config >/dev/null; then
	uci set mihomo.config='mihomo'
	uci set mihomo.config.enabled='0'
	uci commit mihomo
fi

exit 0
