mirror of https://github.com/cowrie/cowrie.git
add virtualenv support to start.sh
This commit is contained in:
parent
355282dac8
commit
224f104dc5
30
start.sh
30
start.sh
|
@ -1,6 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Starting kippo in the background...\n"
|
||||
cd $(dirname $0)
|
||||
twistd -y kippo.tac -l log/kippo.log --pidfile kippo.pid
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
if [ "$1" != "" ]
|
||||
then
|
||||
VENV="$1"
|
||||
|
||||
if [ ! -d "$VENV" ]
|
||||
then
|
||||
echo "The specified virtualenv \"$VENV\" was not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$VENV/bin/activate" ]
|
||||
then
|
||||
echo "The specified virtualenv \"$VENV\" was not found!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Activating virtualenv \"$VENV\""
|
||||
. $VENV/bin/activate
|
||||
fi
|
||||
|
||||
twistd --version
|
||||
|
||||
echo "Starting kippo in the background..."
|
||||
twistd -y kippo.tac -l log/kippo.log --pidfile kippo.pid
|
||||
|
|
Loading…
Reference in New Issue