haproxy-wi/update.sh

40 lines
816 B
Bash
Raw Normal View History

2018-05-01 09:00:30 +00:00
#!/bin/bash
2018-05-08 09:12:16 +00:00
# set -x
2018-10-11 02:49:50 +00:00
cp app/haproxy-wi.cfg /tmp/
2018-05-01 09:00:30 +00:00
git reset --hard
git pull https://github.com/Aidaho12/haproxy-wi.git
mv -f /tmp/haproxy-wi.cfg app/haproxy-wi.cfg
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-10-11 02:49:50 +00:00
chmod +x ../update.sh
2018-10-04 14:56:02 +00:00
echo "################"
echo ""
echo ""
echo ""
2018-10-11 02:49:50 +00:00
echo "ATTENTION!!! New config file name is: haproxy-wi.cfg"
2018-10-04 14:56:02 +00:00
echo ""
echo ""
echo ""
echo "################"