Home · Latest · Trends  /  general
0

Safely make network change

rated 0 times [  0] [ 0]  / comments: 1 / hits: 958  / 2 yaers ago, wed, feb 22, 2017, 14:55:28
If you're working on a remote server, you may want to try something like this to make a network change so it'll change back if you get disconnected.
#!/bin/bash
file='/etc/sysconfig/network-scripts/ifcfg-eth0'
cp -a "${file}" "${file}_backup"
sed -i 's/192.168.123./100.100.100./g' "${file}"
ifdown eth0; ifup eth0
sleep 100
/bin/mv "${file}_backup" "${file}"
ifdown eth0; ifup eth0
More From » general
 

Comments

0
I found this blog. Much appreciation to you for offering to us, I, everything considered, find some new data from your post. to a cerebrum boggling degree Chris Jericho WWE Jacket satisfying and I to an amazing degree like your article a commitment of Thankfulness is everything
[#12] Thursday, March 14, 2019, 06:44:19
 
ms199730
commented 5 days ago
Only authorized users can post. Please sign in first, or register a free account
 
Share
Sponsor
Posted
rob

rob

Member since Feb 22, 2017
Total Code Snippets: 123
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017