Update 'DynDNS/install.sh'

This commit is contained in:
Filip Znachor 2022-05-28 10:44:36 +02:00
parent 393a262111
commit 7392f170c8

View file

@ -12,13 +12,11 @@ domain=$(uci get dhcp.@dnsmasq[0].domain)
sed -i "s/.lan/.$domain/gi" /root/dyndns/dyndns.lua
# Create dhcp script
echo "cd /root/dyndns/ && lua dyndns.lua" > /root/dyndns/dyndns.sh
echo "cd /root/dyndns/ && lua dyndns.lua" > /etc/hotplug.d/dhcp/99-dyndns
# Allow execution
chmod +x /root/dyndns/*.*
# Add dhcpscript to the config
uci set dhcp.@dnsmasq[0].dhcpscript='/root/dyndns/dyndns.sh'
chmod 755 /etc/hotplug.d/dhcp/99-dyndns
chmod +x /etc/hotplug.d/dhcp/99-dyndns
# Add addnlist to the config
uci set dhcp.@dnsmasq[0].addnhosts='/tmp/dyndns'