#940: Avoid error when Linux daemon scripts look for Python version.

remotes/github/python3
Ramón M. Gómez 2020-06-30 18:37:48 +02:00
parent 9424789f69
commit 6900215e9c
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
for p in python python3; do
[ -z "$PYTHON" ] && [ $($p -c 'import sys; print(sys.version_info[0])') -eq 3 ] && PYTHON=$p
[ "$(command -v $p)" ] && [ -z "$PYTHON" ] && [ $($p -c 'import sys; print(sys.version_info[0])') -eq 3 ] && PYTHON=$p
done
if [ -z "$PYTHON" ]; then
echo "ERROR: OGAgent needs Python 3" &>2

View File

@ -1,7 +1,7 @@
#!/bin/sh
for p in python python3; do
[ -z "$PYTHON" ] && [ $($p -c 'import sys; print(sys.version_info[0])') -eq 3 ] && PYTHON=$p
[ "$(command -v $p)" ] && [ -z "$PYTHON" ] && [ $($p -c 'import sys; print(sys.version_info[0])') -eq 3 ] && PYTHON=$p
done
if [ -z "$PYTHON" ]; then
echo "ERROR: OGAgent needs Python 3" &>2