cowrie/start.sh

35 lines
694 B
Bash
Raw Normal View History

#!/bin/sh
2016-01-17 06:32:35 +00:00
AUTHBIND_ENABLED=no
2014-08-11 17:39:26 +00:00
set -e
cd $(dirname $0)
2014-08-11 17:39:26 +00:00
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 with extra arguments [$XARGS] ..."
if [ $AUTHBIND_ENABLED = "no" ]
2016-01-17 06:32:35 +00:00
then
twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile cowrie.pid cowrie
2016-01-17 06:32:35 +00:00
else
authbind --deep twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile cowrie.pid cowrie
2016-01-17 06:32:35 +00:00
fi