mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2025-12-13 18:44:31 +05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2806a26a07 | ||
|
|
0cfe54a8e2 | ||
|
|
dfab862088 |
@@ -205,7 +205,7 @@ cat << 'EOF' > /etc/sing-box/config.json
|
|||||||
"type": "tun",
|
"type": "tun",
|
||||||
"interface_name": "tun0",
|
"interface_name": "tun0",
|
||||||
"domain_strategy": "ipv4_only",
|
"domain_strategy": "ipv4_only",
|
||||||
"inet4_address": "172.16.250.1/30",
|
"address": ["172.16.250.1/30"],
|
||||||
"auto_route": false,
|
"auto_route": false,
|
||||||
"strict_route": false,
|
"strict_route": false,
|
||||||
"sniff": true
|
"sniff": true
|
||||||
@@ -325,7 +325,7 @@ dnsmasqfull() {
|
|||||||
[ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp
|
[ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
s
|
|
||||||
dnsmasqconfdir() {
|
dnsmasqconfdir() {
|
||||||
if [ $VERSION_ID -ge 24 ]; then
|
if [ $VERSION_ID -ge 24 ]; then
|
||||||
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
||||||
|
|||||||
@@ -78,7 +78,9 @@
|
|||||||
key: dhcp.@dnsmasq[0]
|
key: dhcp.@dnsmasq[0]
|
||||||
value:
|
value:
|
||||||
confdir: "/tmp/dnsmasq.d"
|
confdir: "/tmp/dnsmasq.d"
|
||||||
when: dnsmasq_confdir.stdout != "/tmp/dnsmasq.d" and openwrt_major_release >= 24
|
when: ansible_distribution_major_version >= 24
|
||||||
|
notify:
|
||||||
|
- Restart dnsmasq
|
||||||
|
|
||||||
# Getdomains script configure
|
# Getdomains script configure
|
||||||
|
|
||||||
@@ -672,6 +674,13 @@
|
|||||||
notify:
|
notify:
|
||||||
- Restart firewall
|
- Restart firewall
|
||||||
|
|
||||||
|
- name: uci commit dhcp
|
||||||
|
uci:
|
||||||
|
command: commit
|
||||||
|
config: dhcp
|
||||||
|
notify:
|
||||||
|
- Restart dnsmasq
|
||||||
|
|
||||||
- name: uci commit network
|
- name: uci commit network
|
||||||
uci:
|
uci:
|
||||||
command: commit
|
command: commit
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"type": "tun",
|
"type": "tun",
|
||||||
"interface_name": "tun0",
|
"interface_name": "tun0",
|
||||||
"domain_strategy": "ipv4_only",
|
"domain_strategy": "ipv4_only",
|
||||||
"inet4_address": "172.16.250.1/30",
|
"address": ["172.16.250.1/30"],
|
||||||
"auto_route": false,
|
"auto_route": false,
|
||||||
"strict_route": false,
|
"strict_route": false,
|
||||||
"sniff": true
|
"sniff": true
|
||||||
|
|||||||
Reference in New Issue
Block a user