You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.0 KiB

  1. #!/bin/sh
  2. # add new section "ddns" "global" if not exists
  3. /sbin/uci -q get ddns.global > /dev/null || /sbin/uci -q set ddns.global='ddns'
  4. /sbin/uci -q get ddns.global.date_format > /dev/null || /sbin/uci -q set ddns.global.date_format='%F %R'
  5. /sbin/uci -q get ddns.global.log_lines > /dev/null || /sbin/uci -q set ddns.global.log_lines='250'
  6. /sbin/uci -q get ddns.global.allow_local_ip > /dev/null || /sbin/uci -q set ddns.global.allow_local_ip='0'
  7. /sbin/uci -q commit ddns
  8. # fix some service_name entries to new once
  9. /bin/sed -i \
  10. -e '/service_name/s/CloudFlare/cloudflare\.com/g' \
  11. -e '/service_name/s/NoIP\.com/no-ip\.com/g' \
  12. -e '/service_name/s/No-IP\.com/no-ip\.com/g' \
  13. -e '/service_name/s/freedns.afraid.org/afraid.org/g' \
  14. -e '/service_name/s/free.editdns.net/editdns.net/g' \
  15. -e '/service_name/s/domains.google.com/google.com/g' \
  16. -e '/service_name/s/spdns.de/spdyn.de/g' \
  17. -e '/service_name/s/strato.de/strato.com/g' \
  18. /etc/config/ddns
  19. # clear LuCI indexcache
  20. rm -f /tmp/luci-indexcache >/dev/null 2>&1
  21. exit 0