Add: script for auto testing resolve domain to specific interface
All checks were successful
/ test (push) Successful in 19s
All checks were successful
/ test (push) Successful in 19s
This commit is contained in:
parent
35eb3e02b1
commit
6926af6485
2 changed files with 34 additions and 1 deletions
10
ShellScripts/set_dns_search_domain.sh
Executable file
10
ShellScripts/set_dns_search_domain.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check the SSID of the connected Wi-Fi network
|
||||
current_ssid=$(nmcli -t -f active,ssid dev wifi | grep -E '^yes' | cut -d\: -f2)
|
||||
|
||||
# Check if the connected Wi-Fi network is the one you want to target
|
||||
if [ "$current_ssid" = "<Your_Targeted_WiFi_SSID>" ]; then
|
||||
# Set the DNS search domain for the taget interface
|
||||
resolvectl domain <interface> <domain>
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue