From: Jo-Philipp Wich Date: Wed, 27 Jan 2016 15:47:23 +0000 (+0100) Subject: Use numeric prefixes for uci-defaults scripts X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=8eaac4b637d989680ad86dc3e84b0f3b547c1619 Use numeric prefixes for uci-defaults scripts Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-ahcp/root/etc/uci-defaults/40_luci-ahcp b/applications/luci-app-ahcp/root/etc/uci-defaults/40_luci-ahcp new file mode 100755 index 000000000..f2b2487ca --- /dev/null +++ b/applications/luci-app-ahcp/root/etc/uci-defaults/40_luci-ahcp @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@ahcpd[-1] + add ucitrack ahcpd + set ucitrack.@ahcpd[-1].init=ahcpd + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-ahcp/root/etc/uci-defaults/luci-ahcp b/applications/luci-app-ahcp/root/etc/uci-defaults/luci-ahcp deleted file mode 100755 index f2b2487ca..000000000 --- a/applications/luci-app-ahcp/root/etc/uci-defaults/luci-ahcp +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@ahcpd[-1] - add ucitrack ahcpd - set ucitrack.@ahcpd[-1].init=ahcpd - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-asterisk/root/etc/uci-defaults/40_luci-asterisk b/applications/luci-app-asterisk/root/etc/uci-defaults/40_luci-asterisk new file mode 100755 index 000000000..e45819f60 --- /dev/null +++ b/applications/luci-app-asterisk/root/etc/uci-defaults/40_luci-asterisk @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@asterisk[-1] + add ucitrack asterisk + set ucitrack.@asterisk[-1].init=asterisk + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-asterisk/root/etc/uci-defaults/luci-asterisk b/applications/luci-app-asterisk/root/etc/uci-defaults/luci-asterisk deleted file mode 100755 index e45819f60..000000000 --- a/applications/luci-app-asterisk/root/etc/uci-defaults/luci-asterisk +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@asterisk[-1] - add ucitrack asterisk - set ucitrack.@asterisk[-1].init=asterisk - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-ddns/root/etc/uci-defaults/40_luci-ddns b/applications/luci-app-ddns/root/etc/uci-defaults/40_luci-ddns new file mode 100755 index 000000000..9fd875e34 --- /dev/null +++ b/applications/luci-app-ddns/root/etc/uci-defaults/40_luci-ddns @@ -0,0 +1,10 @@ +#!/bin/sh + +# no longer needed for "Save and Apply" to restart ddns +uci -q batch <<-EOF >/dev/null + delete ucitrack.@ddns[-1] + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-ddns/root/etc/uci-defaults/luci-ddns b/applications/luci-app-ddns/root/etc/uci-defaults/luci-ddns deleted file mode 100755 index 9fd875e34..000000000 --- a/applications/luci-app-ddns/root/etc/uci-defaults/luci-ddns +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# no longer needed for "Save and Apply" to restart ddns -uci -q batch <<-EOF >/dev/null - delete ucitrack.@ddns[-1] - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090 b/applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090 new file mode 100644 index 000000000..4475d2fb9 --- /dev/null +++ b/applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090 @@ -0,0 +1,12 @@ +#!/bin/sh + +# needed for "Save and Apply" to restart dump1090 +uci -q batch <<-EOF >/dev/null + delete ucitrack.@dump1090[-1] + add ucitrack dump1090 + set ucitrack.@dump1090[-1].init="dump1090" + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-dump1090/root/etc/uci-defaults/luci-dump1090 b/applications/luci-app-dump1090/root/etc/uci-defaults/luci-dump1090 deleted file mode 100644 index 4475d2fb9..000000000 --- a/applications/luci-app-dump1090/root/etc/uci-defaults/luci-dump1090 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# needed for "Save and Apply" to restart dump1090 -uci -q batch <<-EOF >/dev/null - delete ucitrack.@dump1090[-1] - add ucitrack dump1090 - set ucitrack.@dump1090[-1].init="dump1090" - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/40_luci-freifunk-diagnostics b/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/40_luci-freifunk-diagnostics new file mode 100644 index 000000000..963d8a4ef --- /dev/null +++ b/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/40_luci-freifunk-diagnostics @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f /tmp/luci-indexcache diff --git a/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/luci-freifunk-diagnostics b/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/luci-freifunk-diagnostics deleted file mode 100644 index 963d8a4ef..000000000 --- a/applications/luci-app-freifunk-diagnostics/root/etc/uci-defaults/luci-freifunk-diagnostics +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -rm -f /tmp/luci-indexcache diff --git a/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd new file mode 100644 index 000000000..01b85de25 --- /dev/null +++ b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd @@ -0,0 +1,22 @@ +#!/bin/sh +#-- Copyright 2015 Jonathan Bennett +#-- Licensed to the public under the GNU General Public License v2. +. /lib/functions/network.sh + +uci batch < -#-- Licensed to the public under the GNU General Public License v2. -. /lib/functions/network.sh - -uci batch </dev/null + delete ucitrack.@hd-idle[-1] + add ucitrack hd-idle + set ucitrack.@hd-idle[-1].init=hd-idle + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-hd-idle/root/etc/uci-defaults/luci-hd_idle b/applications/luci-app-hd-idle/root/etc/uci-defaults/luci-hd_idle deleted file mode 100755 index 92f435636..000000000 --- a/applications/luci-app-hd-idle/root/etc/uci-defaults/luci-hd_idle +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@hd-idle[-1] - add ucitrack hd-idle - set ucitrack.@hd-idle[-1].init=hd-idle - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-minidlna/root/etc/uci-defaults/40_luci-minidlna b/applications/luci-app-minidlna/root/etc/uci-defaults/40_luci-minidlna new file mode 100755 index 000000000..df43c1b37 --- /dev/null +++ b/applications/luci-app-minidlna/root/etc/uci-defaults/40_luci-minidlna @@ -0,0 +1,15 @@ +#!/bin/sh + +/etc/init.d/minidlna enabled && { + /etc/init.d/minidlna stop + /etc/init.d/minidlna disable +} + +uci -q batch <<-EOF >/dev/null + delete ucitrack.minidlna + set ucitrack.minidlna=minidlna + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-minidlna/root/etc/uci-defaults/luci-minidlna b/applications/luci-app-minidlna/root/etc/uci-defaults/luci-minidlna deleted file mode 100755 index df43c1b37..000000000 --- a/applications/luci-app-minidlna/root/etc/uci-defaults/luci-minidlna +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -/etc/init.d/minidlna enabled && { - /etc/init.d/minidlna stop - /etc/init.d/minidlna disable -} - -uci -q batch <<-EOF >/dev/null - delete ucitrack.minidlna - set ucitrack.minidlna=minidlna - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer b/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer new file mode 100755 index 000000000..6a380cfe5 --- /dev/null +++ b/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@mjpg-streamer[-1] + add ucitrack mjpg-streamer + set ucitrack.@mjpg-streamer[-1].init=mjpg-streamer + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/luci-mjpg-streamer b/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/luci-mjpg-streamer deleted file mode 100755 index 6a380cfe5..000000000 --- a/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/luci-mjpg-streamer +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@mjpg-streamer[-1] - add ucitrack mjpg-streamer - set ucitrack.@mjpg-streamer[-1].init=mjpg-streamer - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/40_luci-mmc-over-gpio b/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/40_luci-mmc-over-gpio new file mode 100755 index 000000000..c6e79e60d --- /dev/null +++ b/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/40_luci-mmc-over-gpio @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@mmc_over_gpio[-1] + add ucitrack mmc_over_gpio + set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/luci-mmc-over-gpio b/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/luci-mmc-over-gpio deleted file mode 100755 index c6e79e60d..000000000 --- a/applications/luci-app-mmc-over-gpio/root/etc/uci-defaults/luci-mmc-over-gpio +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@mmc_over_gpio[-1] - add ucitrack mmc_over_gpio - set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr b/applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr new file mode 100755 index 000000000..63c01e4a2 --- /dev/null +++ b/applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr @@ -0,0 +1,14 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@olsrd[-1] + add ucitrack olsrd + set ucitrack.@olsrd[-1].init=olsrd + delete ucitrack.@olsrd6[-1] + add ucitrack olsrd6 + set ucitrack.@olsrd6[-1].init=olsrd6 + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-olsr/root/etc/uci-defaults/luci-olsr b/applications/luci-app-olsr/root/etc/uci-defaults/luci-olsr deleted file mode 100755 index 63c01e4a2..000000000 --- a/applications/luci-app-olsr/root/etc/uci-defaults/luci-olsr +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@olsrd[-1] - add ucitrack olsrd - set ucitrack.@olsrd[-1].init=olsrd - delete ucitrack.@olsrd6[-1] - add ucitrack olsrd6 - set ucitrack.@olsrd6[-1].init=olsrd6 - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-p2pblock/root/etc/uci-defaults/40_luci-p2pblock b/applications/luci-app-p2pblock/root/etc/uci-defaults/40_luci-p2pblock new file mode 100755 index 000000000..030ebbed1 --- /dev/null +++ b/applications/luci-app-p2pblock/root/etc/uci-defaults/40_luci-p2pblock @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete citrack.@freifunk_p2pblock[-1] + add ucitrack freifunk_p2pblock + set ucitrack.@freifunk_p2pblock[-1].init=freifunk-p2pblock + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-p2pblock/root/etc/uci-defaults/luci-p2pblock b/applications/luci-app-p2pblock/root/etc/uci-defaults/luci-p2pblock deleted file mode 100755 index 030ebbed1..000000000 --- a/applications/luci-app-p2pblock/root/etc/uci-defaults/luci-p2pblock +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete citrack.@freifunk_p2pblock[-1] - add ucitrack freifunk_p2pblock - set ucitrack.@freifunk_p2pblock[-1].init=freifunk-p2pblock - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-p910nd/root/etc/uci-defaults/40_luci-p910nd b/applications/luci-app-p910nd/root/etc/uci-defaults/40_luci-p910nd new file mode 100755 index 000000000..80f6d62fa --- /dev/null +++ b/applications/luci-app-p910nd/root/etc/uci-defaults/40_luci-p910nd @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@p910nd[-1] + add ucitrack p910nd + set ucitrack.@p910nd[-1].init=p910nd + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-p910nd/root/etc/uci-defaults/luci-p910nd b/applications/luci-app-p910nd/root/etc/uci-defaults/luci-p910nd deleted file mode 100755 index 80f6d62fa..000000000 --- a/applications/luci-app-p910nd/root/etc/uci-defaults/luci-p910nd +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@p910nd[-1] - add ucitrack p910nd - set ucitrack.@p910nd[-1].init=p910nd - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-polipo/root/etc/uci-defaults/40_luci-polipo b/applications/luci-app-polipo/root/etc/uci-defaults/40_luci-polipo new file mode 100755 index 000000000..0c570630d --- /dev/null +++ b/applications/luci-app-polipo/root/etc/uci-defaults/40_luci-polipo @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@polipo[-1] + add ucitrack polipo + set ucitrack.@polipo[-1].init=polipo + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-polipo/root/etc/uci-defaults/luci-polipo b/applications/luci-app-polipo/root/etc/uci-defaults/luci-polipo deleted file mode 100755 index 0c570630d..000000000 --- a/applications/luci-app-polipo/root/etc/uci-defaults/luci-polipo +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@polipo[-1] - add ucitrack polipo - set ucitrack.@polipo[-1].init=polipo - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-privoxy/root/etc/uci-defaults/40_luci-privoxy b/applications/luci-app-privoxy/root/etc/uci-defaults/40_luci-privoxy new file mode 100755 index 000000000..3405479b5 --- /dev/null +++ b/applications/luci-app-privoxy/root/etc/uci-defaults/40_luci-privoxy @@ -0,0 +1,12 @@ +#!/bin/sh + +# no longer needed for "Save and Apply" to restart privoxy +# luci-app-privoxy calls /etc/init.d/privoxy reload +uci -q batch <<-EOF >/dev/null + delete ucitrack.@privoxy[-1] + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache + +exit 0 diff --git a/applications/luci-app-privoxy/root/etc/uci-defaults/luci-privoxy b/applications/luci-app-privoxy/root/etc/uci-defaults/luci-privoxy deleted file mode 100755 index 3405479b5..000000000 --- a/applications/luci-app-privoxy/root/etc/uci-defaults/luci-privoxy +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# no longer needed for "Save and Apply" to restart privoxy -# luci-app-privoxy calls /etc/init.d/privoxy reload -uci -q batch <<-EOF >/dev/null - delete ucitrack.@privoxy[-1] - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache - -exit 0 diff --git a/applications/luci-app-radicale/root/etc/uci-defaults/40_luci-radicale b/applications/luci-app-radicale/root/etc/uci-defaults/40_luci-radicale new file mode 100755 index 000000000..333ca65f4 --- /dev/null +++ b/applications/luci-app-radicale/root/etc/uci-defaults/40_luci-radicale @@ -0,0 +1,12 @@ +#!/bin/sh + +# no longer needed for "Save and Apply" to restart radicale +# luci-app-radicale calls /etc/init.d/radicale reload +uci -q batch <<-EOF >/dev/null + delete ucitrack.@radicale[-1] + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache + +exit 0 diff --git a/applications/luci-app-radicale/root/etc/uci-defaults/luci-radicale b/applications/luci-app-radicale/root/etc/uci-defaults/luci-radicale deleted file mode 100755 index 333ca65f4..000000000 --- a/applications/luci-app-radicale/root/etc/uci-defaults/luci-radicale +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# no longer needed for "Save and Apply" to restart radicale -# luci-app-radicale calls /etc/init.d/radicale reload -uci -q batch <<-EOF >/dev/null - delete ucitrack.@radicale[-1] - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache - -exit 0 diff --git a/applications/luci-app-radvd/root/etc/uci-defaults/40_luci-radvd b/applications/luci-app-radvd/root/etc/uci-defaults/40_luci-radvd new file mode 100755 index 000000000..c1f3b7546 --- /dev/null +++ b/applications/luci-app-radvd/root/etc/uci-defaults/40_luci-radvd @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@radvd[-1] + add ucitrack radvd + set ucitrack.@radvd[-1].init=radvd + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-radvd/root/etc/uci-defaults/luci-radvd b/applications/luci-app-radvd/root/etc/uci-defaults/luci-radvd deleted file mode 100755 index c1f3b7546..000000000 --- a/applications/luci-app-radvd/root/etc/uci-defaults/luci-radvd +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@radvd[-1] - add ucitrack radvd - set ucitrack.@radvd[-1].init=radvd - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/40_luci-shadowsocks-libev b/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/40_luci-shadowsocks-libev new file mode 100644 index 000000000..6f30fa77b --- /dev/null +++ b/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/40_luci-shadowsocks-libev @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@shadowsocks-libev[-1] + add ucitrack shadowsocks-libev + set ucitrack.@shadowsocks-libev[-1].init=shadowsocks-libev + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/luci-shadowsocks-libev b/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/luci-shadowsocks-libev deleted file mode 100644 index 6f30fa77b..000000000 --- a/applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/luci-shadowsocks-libev +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@shadowsocks-libev[-1] - add ucitrack shadowsocks-libev - set ucitrack.@shadowsocks-libev[-1].init=shadowsocks-libev - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay b/applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay new file mode 100644 index 000000000..efc8a89bb --- /dev/null +++ b/applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay @@ -0,0 +1,12 @@ +#!/bin/sh + +# needed for "Save and Apply" to restart shairplay +uci -q batch <<-EOF >/dev/null + delete ucitrack.@shairplay[-1] + add ucitrack shairplay + set ucitrack.@shairplay[-1].init="shairplay" + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-shairplay/root/etc/uci-defaults/luci-shairplay b/applications/luci-app-shairplay/root/etc/uci-defaults/luci-shairplay deleted file mode 100644 index efc8a89bb..000000000 --- a/applications/luci-app-shairplay/root/etc/uci-defaults/luci-shairplay +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# needed for "Save and Apply" to restart shairplay -uci -q batch <<-EOF >/dev/null - delete ucitrack.@shairplay[-1] - add ucitrack shairplay - set ucitrack.@shairplay[-1].init="shairplay" - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-shairport/root/etc/uci-defaults/40_luci-shairport b/applications/luci-app-shairport/root/etc/uci-defaults/40_luci-shairport new file mode 100644 index 000000000..be9412bac --- /dev/null +++ b/applications/luci-app-shairport/root/etc/uci-defaults/40_luci-shairport @@ -0,0 +1,12 @@ +#!/bin/sh + +# needed for "Save and Apply" to restart shairport +uci -q batch <<-EOF >/dev/null + delete ucitrack.@shairport[-1] + add ucitrack shairport + set ucitrack.@shairport[-1].init="shairport" + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-shairport/root/etc/uci-defaults/luci-shairport b/applications/luci-app-shairport/root/etc/uci-defaults/luci-shairport deleted file mode 100644 index be9412bac..000000000 --- a/applications/luci-app-shairport/root/etc/uci-defaults/luci-shairport +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# needed for "Save and Apply" to restart shairport -uci -q batch <<-EOF >/dev/null - delete ucitrack.@shairport[-1] - add ucitrack shairport - set ucitrack.@shairport[-1].init="shairport" - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics b/applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics new file mode 100755 index 000000000..28e35298a --- /dev/null +++ b/applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics @@ -0,0 +1,16 @@ +#!/bin/sh + +# register commit handler +uci -q batch <<-EOF >/dev/null + delete ucitrack.@luci_statistics[-1] + add ucitrack luci_statistics + set ucitrack.@luci_statistics[-1].init=luci_statistics + commit ucitrack +EOF + +# symlink for busybox httpd +[ -x /usr/sbin/httpd ] && [ ! -h /www/rrdimg ] && \ + ln -s /tmp/rrdimg /www/rrdimg + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-statistics/root/etc/uci-defaults/luci-statistics b/applications/luci-app-statistics/root/etc/uci-defaults/luci-statistics deleted file mode 100755 index 28e35298a..000000000 --- a/applications/luci-app-statistics/root/etc/uci-defaults/luci-statistics +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# register commit handler -uci -q batch <<-EOF >/dev/null - delete ucitrack.@luci_statistics[-1] - add ucitrack luci_statistics - set ucitrack.@luci_statistics[-1].init=luci_statistics - commit ucitrack -EOF - -# symlink for busybox httpd -[ -x /usr/sbin/httpd ] && [ ! -h /www/rrdimg ] && \ - ln -s /tmp/rrdimg /www/rrdimg - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-transmission/root/etc/uci-defaults/40_luci-transmission b/applications/luci-app-transmission/root/etc/uci-defaults/40_luci-transmission new file mode 100644 index 000000000..456e8b89a --- /dev/null +++ b/applications/luci-app-transmission/root/etc/uci-defaults/40_luci-transmission @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@tranmsmission[-1] + add ucitrack transmission + set ucitrack.@transmission[-1].init=transmission + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-transmission/root/etc/uci-defaults/luci-transmission b/applications/luci-app-transmission/root/etc/uci-defaults/luci-transmission deleted file mode 100644 index 456e8b89a..000000000 --- a/applications/luci-app-transmission/root/etc/uci-defaults/luci-transmission +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@tranmsmission[-1] - add ucitrack transmission - set ucitrack.@transmission[-1].init=transmission - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy b/applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy new file mode 100644 index 000000000..e93c07880 --- /dev/null +++ b/applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy @@ -0,0 +1,12 @@ +#!/bin/sh + +# needed for "Save and Apply" to restart udpxy +uci -q batch <<-EOF >/dev/null + delete ucitrack.@udpxy[-1] + add ucitrack udpxy + set ucitrack.@udpxy[-1].init="udpxy" + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-udpxy/root/etc/uci-defaults/luci-udpxy b/applications/luci-app-udpxy/root/etc/uci-defaults/luci-udpxy deleted file mode 100644 index e93c07880..000000000 --- a/applications/luci-app-udpxy/root/etc/uci-defaults/luci-udpxy +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# needed for "Save and Apply" to restart udpxy -uci -q batch <<-EOF >/dev/null - delete ucitrack.@udpxy[-1] - add ucitrack udpxy - set ucitrack.@udpxy[-1].init="udpxy" - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-ushare/root/etc/uci-defaults/40_luci-ushare b/applications/luci-app-ushare/root/etc/uci-defaults/40_luci-ushare new file mode 100755 index 000000000..8bcb6e411 --- /dev/null +++ b/applications/luci-app-ushare/root/etc/uci-defaults/40_luci-ushare @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@ushare[-1] + add ucitrack ushare + set ucitrack.@ushare[-1].init=ushare + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-ushare/root/etc/uci-defaults/luci-ushare b/applications/luci-app-ushare/root/etc/uci-defaults/luci-ushare deleted file mode 100755 index 8bcb6e411..000000000 --- a/applications/luci-app-ushare/root/etc/uci-defaults/luci-ushare +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@ushare[-1] - add ucitrack ushare - set ucitrack.@ushare[-1].init=ushare - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat b/applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat new file mode 100755 index 000000000..fa204b3b4 --- /dev/null +++ b/applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@vnstat[-1] + add ucitrack vnstat + set ucitrack.@vnstat[-1].init=vnstat + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-vnstat/root/etc/uci-defaults/luci-vnstat b/applications/luci-app-vnstat/root/etc/uci-defaults/luci-vnstat deleted file mode 100755 index fa204b3b4..000000000 --- a/applications/luci-app-vnstat/root/etc/uci-defaults/luci-vnstat +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@vnstat[-1] - add ucitrack vnstat - set ucitrack.@vnstat[-1].init=vnstat - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-watchcat/root/etc/uci-defaults/40_luci-watchcat b/applications/luci-app-watchcat/root/etc/uci-defaults/40_luci-watchcat new file mode 100644 index 000000000..8cdb8c7b9 --- /dev/null +++ b/applications/luci-app-watchcat/root/etc/uci-defaults/40_luci-watchcat @@ -0,0 +1,10 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + add ucitrack system + set ucitrack.@system[-1].init=watchcat + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-watchcat/root/etc/uci-defaults/luci-watchcat b/applications/luci-app-watchcat/root/etc/uci-defaults/luci-watchcat deleted file mode 100644 index 8cdb8c7b9..000000000 --- a/applications/luci-app-watchcat/root/etc/uci-defaults/luci-watchcat +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - add ucitrack system - set ucitrack.@system[-1].init=watchcat - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/applications/luci-app-wshaper/root/etc/uci-defaults/40_wshaper b/applications/luci-app-wshaper/root/etc/uci-defaults/40_wshaper new file mode 100644 index 000000000..918dff280 --- /dev/null +++ b/applications/luci-app-wshaper/root/etc/uci-defaults/40_wshaper @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@wshaper[-1] + set ucitrack.wshaper="wshaper" + set ucitrack.wshaper.exec='/etc/init.d/wshaper start' + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/applications/luci-app-wshaper/root/etc/uci-defaults/wshaper b/applications/luci-app-wshaper/root/etc/uci-defaults/wshaper deleted file mode 100644 index 918dff280..000000000 --- a/applications/luci-app-wshaper/root/etc/uci-defaults/wshaper +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@wshaper[-1] - set ucitrack.wshaper="wshaper" - set ucitrack.wshaper.exec='/etc/init.d/wshaper start' - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck new file mode 100644 index 000000000..33b1b99df --- /dev/null +++ b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck @@ -0,0 +1,7 @@ +#!/bin/sh +tables="/etc/iproute2/rt_tables" +test -d /etc/iproute2/ || mkdir -p /etc/iproute2/ +grep -q "gw-check" $tables || echo "200 gw-check" >> $tables +test -f /etc/crontabs/root || touch /etc/crontabs/root +grep -q "ff_olsr_test_gw.sh" /etc/crontabs/root || echo "* * * * * /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root +/etc/init.d/cron restart diff --git a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck deleted file mode 100644 index 33b1b99df..000000000 --- a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/freifunk-gwcheck +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -tables="/etc/iproute2/rt_tables" -test -d /etc/iproute2/ || mkdir -p /etc/iproute2/ -grep -q "gw-check" $tables || echo "200 gw-check" >> $tables -test -f /etc/crontabs/root || touch /etc/crontabs/root -grep -q "ff_olsr_test_gw.sh" /etc/crontabs/root || echo "* * * * * /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root -/etc/init.d/cron restart diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate new file mode 100644 index 000000000..dee7f1bb5 --- /dev/null +++ b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate @@ -0,0 +1,6 @@ +#!/bin/sh +test -f /etc/crontabs/root || touch /etc/crontabs/root +SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )" +MIN="$(( $SEED % 59 ))" +grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root +/etc/init.d/cron restart diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate deleted file mode 100644 index dee7f1bb5..000000000 --- a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -test -f /etc/crontabs/root || touch /etc/crontabs/root -SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )" -MIN="$(( $SEED % 59 ))" -grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root -/etc/init.d/cron restart diff --git a/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap b/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap new file mode 100755 index 000000000..09299e092 --- /dev/null +++ b/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap @@ -0,0 +1,7 @@ +#!/bin/sh +uci batch <<-EOF + set luci.themes.Bootstrap=/luci-static/bootstrap + set luci.main.mediaurlbase=/luci-static/bootstrap + commit luci +EOF +exit 0 diff --git a/themes/luci-theme-bootstrap/root/etc/uci-defaults/luci-theme-bootstrap b/themes/luci-theme-bootstrap/root/etc/uci-defaults/luci-theme-bootstrap deleted file mode 100755 index 09299e092..000000000 --- a/themes/luci-theme-bootstrap/root/etc/uci-defaults/luci-theme-bootstrap +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -uci batch <<-EOF - set luci.themes.Bootstrap=/luci-static/bootstrap - set luci.main.mediaurlbase=/luci-static/bootstrap - commit luci -EOF -exit 0 diff --git a/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/30_luci-theme-freifunk-generic b/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/30_luci-theme-freifunk-generic new file mode 100644 index 000000000..017e7f7ba --- /dev/null +++ b/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/30_luci-theme-freifunk-generic @@ -0,0 +1,5 @@ +uci batch <<-EOF + set luci.themes.Freifunk_Generic=/luci-static/freifunk-generic + set luci.main.mediaurlbase=/luci-static/freifunk-generic + commit luci +EOF diff --git a/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/luci-theme-freifunk-generic b/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/luci-theme-freifunk-generic deleted file mode 100644 index 017e7f7ba..000000000 --- a/themes/luci-theme-freifunk-generic/root/etc/uci-defaults/luci-theme-freifunk-generic +++ /dev/null @@ -1,5 +0,0 @@ -uci batch <<-EOF - set luci.themes.Freifunk_Generic=/luci-static/freifunk-generic - set luci.main.mediaurlbase=/luci-static/freifunk-generic - commit luci -EOF diff --git a/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material b/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material new file mode 100755 index 000000000..b01337821 --- /dev/null +++ b/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material @@ -0,0 +1,7 @@ +#!/bin/sh +uci batch <<-EOF + set luci.themes.Material=/luci-static/material + set luci.main.mediaurlbase=/luci-static/material + commit luci +EOF +exit 0 diff --git a/themes/luci-theme-material/root/etc/uci-defaults/luci-theme-material b/themes/luci-theme-material/root/etc/uci-defaults/luci-theme-material deleted file mode 100755 index b01337821..000000000 --- a/themes/luci-theme-material/root/etc/uci-defaults/luci-theme-material +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -uci batch <<-EOF - set luci.themes.Material=/luci-static/material - set luci.main.mediaurlbase=/luci-static/material - commit luci -EOF -exit 0 diff --git a/themes/luci-theme-openwrt/root/etc/uci-defaults/30_luci-theme-openwrt b/themes/luci-theme-openwrt/root/etc/uci-defaults/30_luci-theme-openwrt new file mode 100755 index 000000000..aa0ba0c23 --- /dev/null +++ b/themes/luci-theme-openwrt/root/etc/uci-defaults/30_luci-theme-openwrt @@ -0,0 +1,6 @@ +#!/bin/sh +uci batch <<-EOF + set luci.themes.OpenWrt=/luci-static/openwrt.org + set luci.main.mediaurlbase=/luci-static/openwrt.org + commit luci +EOF diff --git a/themes/luci-theme-openwrt/root/etc/uci-defaults/luci-theme-openwrt b/themes/luci-theme-openwrt/root/etc/uci-defaults/luci-theme-openwrt deleted file mode 100755 index aa0ba0c23..000000000 --- a/themes/luci-theme-openwrt/root/etc/uci-defaults/luci-theme-openwrt +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -uci batch <<-EOF - set luci.themes.OpenWrt=/luci-static/openwrt.org - set luci.main.mediaurlbase=/luci-static/openwrt.org - commit luci -EOF