haproxy-wi/update.sh

35 lines
926 B
Bash
Raw Normal View History

2018-05-01 09:00:30 +00:00
#!/bin/bash
2018-05-08 09:12:16 +00:00
2018-05-01 09:00:30 +00:00
cp app/haproxy-webintarface.config /tmp/
git reset --hard
git pull https://github.com/Aidaho12/haproxy-wi.git
2018-06-24 09:31:28 +00:00
mkdir keys
2018-05-08 09:12:16 +00:00
mkdir app/certs
2018-05-01 09:00:30 +00:00
chmod +x app/*py
chmod +x app/tools/*py
2018-05-01 09:00:30 +00:00
if hash apt-get 2>/dev/null; then
apt-get install git net-tools lshw dos2unix apache2 gcc netcat python3-pip gcc-c++ -y
else
2018-09-29 05:23:01 +00:00
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
2018-09-20 07:32:08 +00:00
yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip httpd python35u-devel gcc-c++
fi
2018-07-25 15:57:42 +00:00
2018-05-01 09:00:30 +00:00
cd app/
2018-09-01 10:43:25 +00:00
./create_db.py
2018-05-01 09:00:30 +00:00
2018-05-06 17:07:13 +00:00
pip3 install -r ../requirements.txt
2018-09-20 07:32:08 +00:00
pip3.5 install -r ../requirements.txt
2018-05-01 09:00:30 +00:00
echo ""
echo "#################"
echo "Change in config:"
2018-05-07 19:09:56 +00:00
diff --expand-tabs -W 100 -y /tmp/haproxy-webintarface.config haproxy-webintarface.config
2018-05-01 09:00:30 +00:00
echo ""
echo "Please set your config"
echo ""
echo "################"
2018-08-15 08:17:57 +00:00
echo "Your config saved in /tmp/haproxy-webintarface.config. Please compare with new and set your env back"
2018-05-01 09:00:30 +00:00
echo ""