# HG changeset patch # User Goffi # Date 1577450127 -3600 # Node ID b9a8049ca1ff9f788dfe8ca733285b5207682a1d # Parent b32b74dfe866051e38e51e0c3785c48ab39e410d bin (libervia): look for twistd3 first: `twistd3` is now looked first, for the same reason as for backend (see backend commit 0b6d56a8f7e3). diff -r b32b74dfe866 -r b9a8049ca1ff bin/libervia --- a/bin/libervia Sat Dec 07 09:58:22 2019 +0100 +++ b/bin/libervia Fri Dec 27 13:35:27 2019 +0100 @@ -3,7 +3,16 @@ DEBUG="" DAEMON="" PYTHON="python3" -TWISTD="$(which twistd)" + +# for Python 3, "twistd" is named "twistd3" on some distros, so we check for it first +TWISTD="$(which twistd3 2>/dev/null)" +if [ $? -ne 0 ]; then + TWISTD="$(which twistd 2>/dev/null)" +fi +if [ $? -ne 0 ]; then + printf "Can't find \"twistd\" script, are you sure that Twisted is installed?\n" + exit 1 +fi kill_process() { # $1 is the file containing the PID to kill, $2 is the process name