Files
ansible-role-common/files/helpers/set_dhcp_ip.sh
Aaron Guise 682404a819
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
Add static/dhcp ip helpers for NetworkManager
2023-10-18 16:58:24 +13:00

8 lines
255 B
Bash

#!/bin/bash
# This script will reset the IP Address back to default of DHCP
# helpful for a pending restore
/bin/nmcli c m "System eth0" ipv4.method auto
/bin/nmcli c m "System eth0" ipv4.address "" ipv4.gateway ""
/bin/nmcli connection up "System eth0"