mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 22:44:29 +01:00
* Extra arguments to start.sh and improved requirements doc Added possibly to pass extra arguments to twistd in start.sh (e.g. `env XARGS=--nodaemon ./start.sh`). Fixed list of the dependencies based on the issue micheloosterhof/cowrie#132 and added example of dependencies in practice for alpine:3.4. * Fixes no moduli fail with key exchanges Tries to fix issue micheloosterhof/cowrie#193 * Missing requirement and fixed logging
35 lines
694 B
Bash
Executable File
35 lines
694 B
Bash
Executable File
#!/bin/sh
|
|
AUTHBIND_ENABLED=no
|
|
|
|
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 with extra arguments [$XARGS] ..."
|
|
if [ $AUTHBIND_ENABLED = "no" ]
|
|
then
|
|
twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile cowrie.pid cowrie
|
|
else
|
|
authbind --deep twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile cowrie.pid cowrie
|
|
fi
|