f3bad58071c6e60db6f918f36f6ccab9e85954b2
[project/luci.git] / applications / luci-ddns / root / etc / uci-defaults / luci-ddns
1 #!/bin/sh
2
3 # needed for "Save and Apply" to restart ddns
4 uci -q batch <<-EOF >/dev/null
5         delete ucitrack.@ddns[-1]
6         add ucitrack ddns
7         set ucitrack.@ddns[-1].init="ddns"
8         commit ucitrack
9 EOF
10
11 # make helper script executable
12 chmod 755 /usr/lib/ddns/dynamic_dns_lucihelper.sh
13
14 # update application section for luci-app-ddns
15 uci -q get ddns.global > /dev/null || uci -q set ddns.global='ddns'
16 uci -q get ddns.global.date_format > /dev/null || uci -q set ddns.global.date_format='%F %R'
17 uci -q get ddns.global.log_lines > /dev/null || uci -q set ddns.global.log_lines='250'
18 uci -q commit ddns
19
20 rm -f /tmp/luci-indexcache
21 exit 0