applications: revise uci-defaults scripts
This commit is contained in:
parent
ba949a84f6
commit
6811edb3d9
12 changed files with 111 additions and 65 deletions
6
applications/luci-asterisk/root/etc/uci-defaults/luci-asterisk
Normal file → Executable file
6
applications/luci-asterisk/root/etc/uci-defaults/luci-asterisk
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
||||
|
|
98
applications/luci-ffwizard/root/etc/uci-defaults/device-defaults
Normal file → Executable file
98
applications/luci-ffwizard/root/etc/uci-defaults/device-defaults
Normal file → Executable file
|
@ -6,56 +6,62 @@ set_default_config()
|
|||
config_get type "$cfg" "type"
|
||||
case $type in
|
||||
atheros)
|
||||
uci set freifunk.wifi_device.channel=1
|
||||
uci set freifunk.wifi_device.diversity=0
|
||||
uci set freifunk.wifi_device.txantenna=1
|
||||
uci set freifunk.wifi_device.rxantenna=1
|
||||
uci set freifunk.wifi_device.disabled=0
|
||||
uci set freifunk.wifi_device.txpower=""
|
||||
uci set freifunk.wifi_device.country=276
|
||||
uci set freifunk.wifi_device.regdomain="0x37"
|
||||
uci set freifunk.wifi_device.outdoor="1"
|
||||
uci set freifunk.wifi_device.hwmode=11g
|
||||
uci set freifunk.wifi_device.distance=1000
|
||||
uci set freifunk.wifi_iface=defaults
|
||||
uci set freifunk.wifi_iface.mode=adhoc
|
||||
uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
uci set freifunk.wifi_iface.sw_merge=1
|
||||
uci set freifunk.wifi_iface.mcast_rate=5500
|
||||
uci set freifunk.wifi_iface.probereq=1
|
||||
uci commit freifunk
|
||||
uci -q batch <<-EOF
|
||||
set freifunk.wifi_device.channel=1
|
||||
set freifunk.wifi_device.diversity=0
|
||||
set freifunk.wifi_device.txantenna=1
|
||||
set freifunk.wifi_device.rxantenna=1
|
||||
set freifunk.wifi_device.disabled=0
|
||||
set freifunk.wifi_device.txpower=""
|
||||
set freifunk.wifi_device.country=276
|
||||
set freifunk.wifi_device.regdomain="0x37"
|
||||
set freifunk.wifi_device.outdoor="1"
|
||||
set freifunk.wifi_device.hwmode=11g
|
||||
set freifunk.wifi_device.distance=1000
|
||||
set freifunk.wifi_iface=defaults
|
||||
set freifunk.wifi_iface.mode=adhoc
|
||||
set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
set freifunk.wifi_iface.sw_merge=1
|
||||
set freifunk.wifi_iface.mcast_rate=5500
|
||||
set freifunk.wifi_iface.probereq=1
|
||||
commit freifunk
|
||||
EOF
|
||||
;;
|
||||
mac80211)
|
||||
uci set freifunk.wifi_device.channel=1
|
||||
uci set freifunk.wifi_device.diversity=""
|
||||
uci set freifunk.wifi_device.disabled=0
|
||||
uci set freifunk.wifi_device.txpower=""
|
||||
uci set freifunk.wifi_device.country=DE
|
||||
uci set freifunk.wifi_device.distance=1000
|
||||
uci set freifunk.wifi_device.htmode='HT40-'
|
||||
uci set freifunk.wifi_device.hwmode=11ng
|
||||
uci set freifunk.wifi_iface=defaults
|
||||
uci set freifunk.wifi_iface.mode=adhoc
|
||||
uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
uci set freifunk.wifi_iface.sw_merge=""
|
||||
uci commit freifunk
|
||||
uci -q batch <<-EOF
|
||||
set freifunk.wifi_device.channel=1
|
||||
set freifunk.wifi_device.diversity=""
|
||||
set freifunk.wifi_device.disabled=0
|
||||
set freifunk.wifi_device.txpower=""
|
||||
set freifunk.wifi_device.country=DE
|
||||
set freifunk.wifi_device.distance=1000
|
||||
set freifunk.wifi_device.htmode='HT40-'
|
||||
set freifunk.wifi_device.hwmode=11ng
|
||||
set freifunk.wifi_iface=defaults
|
||||
set freifunk.wifi_iface.mode=adhoc
|
||||
set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
set freifunk.wifi_iface.sw_merge=""
|
||||
commit freifunk
|
||||
EOF
|
||||
;;
|
||||
broadcom)
|
||||
uci set freifunk.wifi_device.channel=1
|
||||
uci set freifunk.wifi_device.diversity=""
|
||||
uci set freifunk.wifi_device.disabled=0
|
||||
uci set freifunk.wifi_device.txpower=""
|
||||
uci set freifunk.wifi_device.country=DE
|
||||
uci set freifunk.wifi_device.txantenna=0
|
||||
uci set freifunk.wifi_device.rxantenna=0
|
||||
uci set freifunk.wifi_device.hwmode=11g
|
||||
uci set freifunk.wifi_device.distance=1000
|
||||
uci set freifunk.wifi_iface=defaults
|
||||
uci set freifunk.wifi_iface.encryption=none
|
||||
uci set freifunk.wifi_iface.mode=adhoc
|
||||
uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
uci set freifunk.wifi_iface.sw_merge=""
|
||||
uci commit freifunk
|
||||
uci -q batch <<-EOF
|
||||
set freifunk.wifi_device.channel=1
|
||||
set freifunk.wifi_device.diversity=""
|
||||
set freifunk.wifi_device.disabled=0
|
||||
set freifunk.wifi_device.txpower=""
|
||||
set freifunk.wifi_device.country=DE
|
||||
set freifunk.wifi_device.txantenna=0
|
||||
set freifunk.wifi_device.rxantenna=0
|
||||
set freifunk.wifi_device.hwmode=11g
|
||||
set freifunk.wifi_device.distance=1000
|
||||
set freifunk.wifi_iface=defaults
|
||||
set freifunk.wifi_iface.encryption=none
|
||||
set freifunk.wifi_iface.mode=adhoc
|
||||
set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE"
|
||||
set freifunk.wifi_iface.sw_merge=""
|
||||
commit freifunk
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
12
applications/luci-hd-idle/root/etc/uci-defaults/luci-hd_idle
Normal file → Executable file
12
applications/luci-hd-idle/root/etc/uci-defaults/luci-hd_idle
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
add ucitrack hd-idle
|
||||
set ucitrack.@hd-idle[-1].init=hd-idle
|
||||
commit ucitrack
|
||||
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
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
6
applications/luci-olsr/root/etc/uci-defaults/luci-olsr
Normal file → Executable file
6
applications/luci-olsr/root/etc/uci-defaults/luci-olsr
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@olsrd[-1]
|
||||
add ucitrack olsrd
|
||||
set ucitrack.@olsrd[-1].init=olsrd
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
|
4
applications/luci-p2pblock/root/etc/uci-defaults/luci-p2pblock
Normal file → Executable file
4
applications/luci-p2pblock/root/etc/uci-defaults/luci-p2pblock
Normal file → Executable file
|
@ -1,9 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF 2>/dev/null
|
||||
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
|
||||
|
|
6
applications/luci-p910nd/root/etc/uci-defaults/luci-p910nd
Normal file → Executable file
6
applications/luci-p910nd/root/etc/uci-defaults/luci-p910nd
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
||||
|
|
6
applications/luci-polipo/root/etc/uci-defaults/luci-polipo
Normal file → Executable file
6
applications/luci-polipo/root/etc/uci-defaults/luci-polipo
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
||||
|
|
5
applications/luci-radvd/root/etc/uci-defaults/luci-radvd
Normal file → Executable file
5
applications/luci-radvd/root/etc/uci-defaults/luci-radvd
Normal file → Executable file
|
@ -1,8 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
||||
|
|
11
applications/luci-statistics/root/etc/uci-defaults/luci-statistics
Normal file → Executable file
11
applications/luci-statistics/root/etc/uci-defaults/luci-statistics
Normal file → Executable file
|
@ -1,9 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# register commit handler
|
||||
[ -f /etc/config/ucitrack ] && \
|
||||
[ "$(uci get ucitrack.@luci_statistics[0] 2>/dev/null)" != "luci_statistics" ] && \
|
||||
uci batch <<-EOF >/dev/null 2>/dev/null
|
||||
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
|
||||
|
@ -11,8 +10,9 @@ EOF
|
|||
|
||||
# register LuCId virtual path handler
|
||||
[ -f /etc/config/lucid ] && \
|
||||
[ "$(uci get lucid.statistics 2>/dev/null)" != "DirectoryPublisher" ] && \
|
||||
uci batch <<-EOF >/dev/null 2>/dev/null
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete lucid.statistics
|
||||
|
||||
set lucid.statistics=DirectoryPublisher
|
||||
set lucid.statistics.name='RRDTool Image Cache'
|
||||
set lucid.statistics.physical=/tmp/rrdimg
|
||||
|
@ -32,4 +32,5 @@ EOF
|
|||
# restart LuCId service
|
||||
[ -x /etc/init.d/lucid ] && /etc/init.d/lucid enabled && /etc/init.d/lucid restart
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#!/bin/sh
|
||||
/etc/init.d/miniupnpd stop
|
||||
/etc/init.d/miniupnpd disable
|
||||
|
||||
/etc/init.d/miniupnpd enabled && {
|
||||
/etc/init.d/miniupnpd stop
|
||||
/etc/init.d/miniupnpd disable
|
||||
}
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
|
6
applications/luci-ushare/root/etc/uci-defaults/luci-ushare
Normal file → Executable file
6
applications/luci-ushare/root/etc/uci-defaults/luci-ushare
Normal file → Executable file
|
@ -1,7 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
uci batch <<-EOF
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue