Add: script for auto testing resolve domain to specific interface
All checks were successful
/ test (push) Successful in 19s

This commit is contained in:
Aroy-Art 2024-03-11 23:01:49 +01:00
parent 35eb3e02b1
commit 6926af6485
Signed by: Aroy
GPG key ID: DB9689E9391DD156
2 changed files with 34 additions and 1 deletions

View 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