start.sh/stop.sh deprecated. use bin/cowrie start|stop

This commit is contained in:
Michel Oosterhof
2016-11-14 11:14:11 +04:00
parent de28f13c28
commit 4ee90bfd28
2 changed files with 0 additions and 50 deletions

View File

@@ -1,38 +0,0 @@
#!/bin/sh
AUTHBIND_ENABLED=no
COWRIEDIR=$(dirname $0)
PIDFILE="var/run/cowrie.pid"
export PYTHONPATH=${PYTHONPATH}:${COWRIEDIR}
#Change the below to -n to disable daemonizing (for instance when using supervisor)
DAEMONIZE=""
set -e
cd ${COWRIEDIR}
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 $DAEMONIZE] ..."
if [ $AUTHBIND_ENABLED = "no" ]
then
twistd $XARGS $DAEMONIZE -l log/cowrie.log --umask 0077 --pidfile ${PIDFILE} cowrie
else
authbind --deep twistd $DAEMONIZE $XARGS -l log/cowrie.log --umask 0077 --pidfile ${PIDFILE} cowrie
fi

12
stop.sh
View File

@@ -1,12 +0,0 @@
#!/bin/sh
PIDFILE=var/run/cowrie.pid
cd $(dirname $0)
PID=$(cat ${PIDFILE} 2>/dev/null)
if [ -n "$PID" ]; then
echo "Stopping cowrie..."
kill -TERM $PID
fi