Mercurial > libervia-backend
comparison bin/sat @ 3263:e81ad34e8af8
bin (sat): check `twistd` before `twistd3` to use venv version first
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 20 Apr 2020 14:52:57 +0200 |
parents | 0b6d56a8f7e3 |
children |
comparison
equal
deleted
inserted
replaced
3262:aa71f1d40300 | 3263:e81ad34e8af8 |
---|---|
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 |