Home · Latest · Trends  /  general
1

Safely make network change

rated 1 times [  1] [ 0]  / comments: 16 / hits: 1432  / 3 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
Simply, admirable what you have done here. It is pleasing to look you express from the heart and your clarity on this significant content can be easily looked. Thanks for sharing. permainan mobile legends
[#73] Wednesday, June 19, 2019, 10:02:37
 
luciham20
commented 3 months ago
0
Thanks a lot for sharing this with all folks you really understand what you are talking approximately! air duct cleaning Orlando
[#82] Wednesday, June 19, 2019, 23:25:26
 
joshuaprice153
commented 3 months ago
0
This is a good blog,it teach me many things.Thank for your share! tree trimming service
[#120] Wednesday, June 26, 2019, 14:56:07
 
ronaldlynch1009
commented 3 months ago
0
Nice article, but i already seen it here
[#182] Wednesday, August 14, 2019, 06:59:46
 
mathew salinas
commented 1 month 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: 127
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017