handle undefined variables

This commit is contained in:
Michel Oosterhof
2017-07-01 19:33:45 +02:00
parent 2670dd4852
commit dc08cbb6c7

View File

@ -63,20 +63,20 @@ cowrie_start() {
TWISTEDARGS="${DAEMONIZE} ${XARGS} --umask 0077 --pidfile ${PIDFILE}" TWISTEDARGS="${DAEMONIZE} ${XARGS} --umask 0077 --pidfile ${PIDFILE}"
# For Docker log to stdout, for non-Docker log to file # For Docker log to stdout, for non-Docker log to file
if [ $DOCKER = "yes" ] if [ "$DOCKER" = "yes" ]
then then
TWISTEDARGS="${TWISTEDARGS} -l -" TWISTEDARGS="${TWISTEDARGS} -l -"
else else
TWISTEDARGS="${TWISTEDARGS} -l log/cowrie.log" TWISTEDARGS="${TWISTEDARGS} -l log/cowrie.log"
fi fi
if [ $VIRTUALENV_ENABLED = "yes" ] if [ "$VIRTUALENV_ENABLED" = "yes" ]
then then
activate_venv "cowrie-env" activate_venv "cowrie-env"
fi fi
echo "Starting cowrie: [twistd ${TWISTEDARGS} cowrie ${COWRIEARGS}]..." echo "Starting cowrie: [twistd ${TWISTEDARGS} cowrie ${COWRIEARGS}]..."
if [ $AUTHBIND_ENABLED = "no" ] if [ "$AUTHBIND_ENABLED" = "no" ]
then then
twistd ${TWISTEDARGS} ${COWRIEARGS} cowrie twistd ${TWISTEDARGS} ${COWRIEARGS} cowrie
else else