Mercurial > libervia-web
diff bin/libervia @ 1231:b9a8049ca1ff
bin (libervia): look for twistd3 first:
`twistd3` is now looked first, for the same reason as for backend (see backend commit
0b6d56a8f7e3).
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Dec 2019 13:35:27 +0100 |
parents | 63f7a2bd1d4a |
children | 2ed4e399e1d4 |
line wrap: on
line diff
--- 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