15 lines
317 B
Bash
15 lines
317 B
Bash
#!/bin/sh
|
|
|
|
for p in python python3; do
|
|
[ "$(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
|
|
exit 1
|
|
fi
|
|
|
|
FOLDER=/usr/share/OGAgent
|
|
|
|
cd $FOLDER
|
|
$PYTHON OGAgentUser.py $@
|