comparison bin/libervia @ 1244:2ed4e399e1d4

bin (libervia): check `twistd` before `twistd3` to use venv version first
author Goffi <goffi@goffi.org>
date Mon, 20 Apr 2020 17:33:41 +0200
parents b9a8049ca1ff
children
comparison
equal deleted inserted replaced
1243:8aff742d0dd0 1244:2ed4e399e1d4
2 2
3 DEBUG="" 3 DEBUG=""
4 DAEMON="" 4 DAEMON=""
5 PYTHON="python3" 5 PYTHON="python3"
6 6
7 # for Python 3, "twistd" is named "twistd3" on some distros, so we check for it first 7 TWISTD="$(which twistd 2>/dev/null)"
8 TWISTD="$(which twistd3 2>/dev/null)"
9 if [ $? -ne 0 ]; then 8 if [ $? -ne 0 ]; then
10 TWISTD="$(which twistd 2>/dev/null)" 9 # for Python 3, "twistd" is named "twistd3" on some distros
10 TWISTD="$(which twistd3 2>/dev/null)"
11 fi 11 fi
12 if [ $? -ne 0 ]; then 12 if [ $? -ne 0 ]; then
13 printf "Can't find \"twistd\" script, are you sure that Twisted is installed?\n" 13 printf "Can't find \"twistd\" script, are you sure that Twisted is installed?\n"
14 exit 1 14 exit 1
15 fi 15 fi