Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service lsyncd stop
- /etc/init.d/networking force-reload
- ifconfig eth0 > /home/sachin/status.txt
- old="0.0.0.0";
- interface=$(/sbin/route -n | grep "^0.0.0.0" | rev | cut -d' ' -f1 | rev);
- ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}' > /home/sachin/ips.txt
- ipaddress=$(head -1 /home/sachin/ips.txt);
- ssh 192.192.4.85 mkdir /home/sachin/$ipaddress
- sed -i "s/$old/$ipaddress/g" /etc/lsyncd/lsyncd.conf.lua
- service lsyncd start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement