uhttpd: return after processing -d switch, only set ubus prefix if not already defined
[openwrt/svn-archive/archive.git] / package / network / services / uhttpd / files / ubus.default
index ba6c289f842f6b7b48edd52e2ae7dc2c6d94b2be..397456db6a99a6cf0c3ddd9ae0c938d538a871dd 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