uhttpd: return after processing -d switch, only set ubus prefix if not already defined
[openwrt.git] / package / network / services / uhttpd / files / ubus.default
index ba6c289..397456d 100644 (file)
@@ -1,2 +1,6 @@
-uci set uhttpd.main.ubus_prefix=/ubus
-uci commit uhttpd
+#!/bin/sh
+
+if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
+       uci set uhttpd.main.ubus_prefix=/ubus
+       uci commit uhttpd
+fi