vpnmanager/setup.sh

20 lines
627 B
Bash
Raw Normal View History

2018-11-26 08:21:49 +00:00
#!/bin/bash
2019-01-25 20:34:27 +00:00
sudo apt update
2019-01-17 19:09:26 +00:00
sudo apt install -y python3-pip npm
2019-01-25 21:27:43 +00:00
sudo pip3 install -U django uwsgi django-two-factor-auth django-bootstrap-form twilio argon2_cffi
2019-01-25 20:34:27 +00:00
useradd vpn
2019-01-17 19:09:26 +00:00
git submodule init
git submodule update
2019-01-25 20:34:27 +00:00
cd lib/jq/
2019-01-17 19:09:26 +00:00
npm run build
2019-01-25 20:34:27 +00:00
cd ../..
2018-11-26 08:21:49 +00:00
./manage.py collectstatic
2019-01-09 18:46:03 +00:00
./manage.py migrate
2019-01-25 21:01:50 +00:00
sudo chown vpn.vpn . -R
2019-01-25 20:37:41 +00:00
sudo cp misc/vpnmanager.service /etc/systemd/system/
2018-11-26 08:21:49 +00:00
sudo systemctl daemon-reload
sudo systemctl enable vpnmanager
sudo systemctl start vpnmanager
echo "This should be working so far. Now point your webserver to uwsgi.sock using its WSGI options. Be sure to include the static files at static/static_root/"