easyctf-2017/deploy
2016-03-16 20:41:05 -05:00

13 lines
No EOL
375 B
Bash

#!/bin/bash
echo "Stopping the server..."
pkill gunicorn
sudo service nginx stop
tmux kill-session -t ctf 2> /dev/null
sudo cp /vagrant/ctf.nginx /etc/nginx/sites-enabled/ctf
echo "Starting the server..."
cd /home/vagrant/server
sudo service nginx start
tmux new-session -s ctf -d 'tmux set remain-on-exit on && gunicorn "app:app" -c /home/vagrant/scripts/gunicorn.py.ini'