Depreciate DuckDNS cron in favor of ddclient
This commit is contained in:
parent
adcaeea71b
commit
3e943686ed
@ -1,11 +0,0 @@
|
||||
- name: Install DuckDNS script
|
||||
template:
|
||||
src: duckdns.sh.j2
|
||||
dest: /usr/local/bin/update-duckdns
|
||||
mode: 0700
|
||||
|
||||
- name: Install DuckDNS cron
|
||||
cron:
|
||||
name: Update DuckDNS
|
||||
minute: "*/5"
|
||||
job: /usr/local/bin/update-duckdns
|
@ -8,10 +8,6 @@
|
||||
tags: network
|
||||
when: manage_network
|
||||
|
||||
- import_tasks: duckdns.yml
|
||||
tags: duckdns
|
||||
when: duckdns is defined
|
||||
|
||||
- import_tasks: ddclient.yml
|
||||
tags: ddclient
|
||||
when: ddclient is defined
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
domains="{{ duckdns.domains }}"
|
||||
token="{{ duckdns.token }}"
|
||||
{% if duckdns.logfile is undefined -%}
|
||||
log="/var/log/duckdns.log"
|
||||
{% else -%}
|
||||
log="{{ duckdns.logfile }}"
|
||||
{% endif %}
|
||||
|
||||
url="https://www.duckdns.org/update?domains=$domains&token=$token&ip="
|
||||
|
||||
time=$(date '+%Y%m%d-%H%M%S')
|
||||
result=$(curl --silent $url)
|
||||
|
||||
if [ "$result" = "OK" ]; then
|
||||
echo "[$time] OK" >> $log
|
||||
else
|
||||
echo "[$time] ERROR: $result" >> $log
|
||||
fi
|
Loading…
Reference in New Issue
Block a user