Issue with "up" and "down" script

Leroy Tennison via Openvpn-users <[email protected]>
Newsgroups gmane.network.openvpn.user
Message-ID <[email protected]>
Below is the script I'm attempting to use (IP address obfuscated but is valid, domain search obfuscated - wouldn't be valid)
#!/bin/bash/usr/bin/echo "Params dev $dev and script type $script_type" >> /tmp/vpn-dnscase "$script_type" in  up)        resolvectl dns $dev 10.10.10.1        /usr/bin/echo "DNS result is $?" >> /tmp/vpn-dns        resolvectl domain $dev cloud.example.com client. example.com rush. example.com example.com        /usr/bin/echo "Domain result is $?" >> /tmp/vpn-dns        ;;  down)        resolvectl dns $dev ""        /usr/bin/echo "DNS result is $?" >> /tmp/vpn-dns        resolvectl domain $dev ""        /usr/bin/echo "Domain result is $?" >> /tmp/vpn-dns        ;;esac
Sometimes it works (can do dig lookups for internal names/IP addresses) and other times it doesn't.  In order to troubleshoot I added the output to the file in /tmp.  Now, when the DNS update is working, there's no file in /tmp.  Any ideas why or suggestions?
Configuration file lines are:
up /etc/openvpn/adj-dnsdown /etc/openvpn/adj-dns
The file itself is owned by root (root:root), permissions 755.  Connection is started/stopped by root via sudo.
Thanks for any insight.

_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.