Last active
March 1, 2019 20:49
-
-
Save bunlongheng/b22e1ebe757939aa44a7ab6ba942b3fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path="/home/benu/backup" | |
if [ -d $path ] | |
then | |
echo "Directory $path exists." | |
echo "Remove old path" | |
rm -rf $path | |
echo "Create new path" | |
mkdir $path | |
else | |
echo "Directory $path does not exists." | |
echo "Create new path" | |
mkdir $path | |
fi | |
ifconfig >> /home/benu/backup/ifconfig.txt | |
cat /home/benu/SSC.cfg >> /home/benu/backup/SSC.cfg.txt | |
cat /etc/sysconfig/network-scripts/ifcfg-eth0 >> /home/benu/backup/eth0.txt | |
cat /etc/sysconfig/network-scripts/ifcfg-eth1 >> /home/benu/backup/eth1.txt | |
cat /etc/sysconfig/network-scripts/ifcfg-eth2 >> /home/benu/backup/eth2.txt | |
cat /usr/share/nginx/ssc-portal/.env >> /home/benu/backup/env.txt | |
cat /etc/hosts >> /home/benu/backup/hosts.txt | |
cat /etc/php.ini >> /home/benu/backup/php.ini.txt | |
cat /etc/nginx/nginx.conf >> /home/benu/backup/nginx.conf.txt | |
cat /home/benu/.ssh/authorized_keys >> /home/benu/backup/authorized_keys.txt | |
cat /etc/resolv.conf >> /home/benu/backup/resolv.conf.txt | |
cd /home/benu/backup/ | |
python -m SimpleHTTPServer 8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment