Replace which with command -v in startup script

This commit is contained in:
JonnyWong16 2020-07-01 22:44:05 -07:00
commit 6dab6194ea
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -14,22 +14,22 @@ if [[ "$TAUTULLI_DOCKER" = "True" ]]; then
echo "Running Tautulli using user $user (uid=$PUID) and group $group (gid=$PGID)"
su "$user" -g "$group" -c "python /app/Tautulli.py --datadir /config"
else
python Tautulli.py --datadir /config
python Tautulli.py --datadir /config
fi
else
if which python3 >/dev/null; then
if command -v python3 >/dev/null; then
python3 Tautulli.py &> /dev/null &
elif which python3.8 >/dev/null; then
elif command -v python3.8 >/dev/null; then
python3.8 Tautulli.py &> /dev/null &
elif which python3.7 >/dev/null; then
elif command -v python3.7 >/dev/null; then
python3.7 Tautulli.py &> /dev/null &
elif which python3.6 >/dev/null; then
elif command -v python3.6 >/dev/null; then
python3.6 Tautulli.py &> /dev/null &
elif which python >/dev/null; then
elif command -v python >/dev/null; then
python Tautulli.py &> /dev/null &
elif which python2 >/dev/null; then
elif command -v python2 >/dev/null; then
python2 Tautulli.py &> /dev/null &
elif which python2.7 >/dev/null; then
elif command -v python2.7 >/dev/null; then
python2.7 Tautulli.py &> /dev/null &
else
echo "Cannot start Tautulli: python not found."