build: rework language dependencies
[project/luci.git] / applications / luci-app-ddns / root / etc / uci-defaults / luci-ddns
1 #!/bin/sh
2
3 # luci updates are not in sync with ddns-script updates !!!
4 # needed because luci update might delete helper script
5 # copy dynamic_dns_helper.tmp.sh from ddns-scripts
6 cp -f /usr/lib/ddns/dynamic_dns_lucihelper.tmp.sh /usr/lib/ddns/dynamic_dns_lucihelper.sh
7
8 # no longer needed for "Save and Apply" to restart ddns
9 uci -q batch <<-EOF >/dev/null
10         delete ucitrack.@ddns[-1]
11         commit ucitrack
12 EOF
13
14 # make helper script executable
15 chmod 755 /usr/lib/ddns/dynamic_dns_lucihelper.sh
16
17 # update application section for luci-app-ddns
18 uci -q get ddns.global > /dev/null || uci -q set ddns.global='ddns'
19 uci -q get ddns.global.date_format > /dev/null || uci -q set ddns.global.date_format='%F %R'
20 uci -q get ddns.global.log_lines > /dev/null || uci -q set ddns.global.log_lines='250'
21 uci -q commit ddns
22
23 rm -f /tmp/luci-indexcache
24 exit 0