Skip to content

Commit 0e88738

Browse files
druckdruck
authored andcommitted
Checks for python3 and pip3 made independent of installed location
1 parent 5841386 commit 0e88738

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/install-service.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ OLD_HYSTERESIS=""
1414

1515
SERVICE_PATH=/etc/systemd/system/pimoroni-fanshim.service
1616

17-
if ! [ -f "/usr/bin/python3" ]; then
17+
if ! ( type -P python3 > /dev/null ) ; then
1818
printf "Fan SHIM controller requires Python 3\n"
1919
printf "You should run: 'sudo apt install python3'\n"
2020
exit 1
2121
fi
2222

23-
if ! [ -f "/usr/bin/pip3" ]; then
23+
if ! ( type -P pip3 > /dev/null ) ; then
2424
printf "Fan SHIM controller requires Python 3 pip\n"
2525
printf "You should run: 'sudo apt install python3-pip'\n"
2626
exit 1

0 commit comments

Comments
 (0)