mirror of https://github.com/cowrie/cowrie.git
29 lines
499 B
Bash
Executable File
29 lines
499 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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
|
|
|
|
echo "Starting cowrie in the background..."
|
|
twistd -l log/cowrie.log --pidfile cowrie.pid cowrie
|