summaryrefslogtreecommitdiff
path: root/django_wsgi.sh
blob: 690a87c9d49247add7be85695e6512351fb6aa35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Launch uwsgi: i.e. connects django to nginx

set -e
pids=$(pidof uwsgi || true)
if [[ ! -z "$pids" ]]; then
	kill $pids || true
	sleep 1
	kill -9 $pids || true
fi
echo "Killed previous instance"

source $HOME/test_bank_login/bin/activate
cd $HOME/bank/TalerBank/
nohup uwsgi --socket :8000 --module TalerBank.wsgi | tee $HOME/nohup.uwsgi.out &
disown