Write script which will be used by porkbun-dynamic-dns-python that adds the public IPv4 address to NetworkManager

This commit is contained in:
Anthony Wang 2023-07-06 21:20:10 +00:00
parent 266bfec24d
commit eac3f38a6c
Signed by: a
GPG key ID: 42A5B952E6DD8D38

6
nmpubip Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
if [ "$1" = "A" ]; then
nmcli con mod 'Wired connection 1' ipv4.addresses "$2"
systemctl restart NetworkManager
fi