#!/bin/bash
export PYTHONPATH=$PWD

if [ -f /usr/bin/twistd ]; then 
    /usr/bin/twistd -ny ./knoboo/knoboo.tac
elif [ -f /usr/local/bin/twistd ]; then 
    /usr/local/bin/twistd -ny ./knoboo/knoboo.tac
elif [ -f $1 ]; then
    $1 -ny ./knoboo/knoboo.tac
else
    echo
    echo "Usage: $0 '/full/path/to/twistd'" 
    echo "    OR install 'twistd' script in /usr/bin or /usr/local/bin"
    echo
fi
