mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-12 21:59:19 +02:00
add check and install for python2
This commit is contained in:
parent
b91043cb22
commit
57788663a8
@ -16,8 +16,9 @@ fi
|
||||
|
||||
# check if nodeJS was installed
|
||||
nodeJSInstalled=$(node -v 2>/dev/null | grep -c "v1.")
|
||||
if [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
|
||||
if ! [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
echo "nodeJS is already installed"
|
||||
else
|
||||
# determine nodeJS VERSION and DISTRO
|
||||
echo "Detect CPU architecture ..."
|
||||
isARM=$(uname -m | grep -c 'arm')
|
||||
@ -89,8 +90,6 @@ if [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
echo "ABORT - nodeJs install"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "nodeJS is already installed"
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
|
@ -30,11 +30,21 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** INSTALL RTL ***"
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/RTL.service 2>/dev/null | grep -c 'RTL.service')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
if ! [ ${isInstalled} -eq 0 ]; then
|
||||
echo "RTL already installed."
|
||||
|
||||
else
|
||||
# check and install NodeJS
|
||||
/home/admin/config.scripts/bonus.nodejs.sh
|
||||
|
||||
# check for Python2 (install if missing)
|
||||
# TODO remove Python2 ASAP!
|
||||
/usr/bin/which python2 &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python2
|
||||
fi
|
||||
|
||||
# download source code and set to tag release
|
||||
echo "*** Get the RTL Source Code ***"
|
||||
rm -r /home/admin/RTL 2>/dev/null
|
||||
@ -91,8 +101,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo systemctl enable RTL
|
||||
echo "OK - the RTL service is now enabled"
|
||||
|
||||
else
|
||||
echo "RTL already installed."
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
|
Loading…
x
Reference in New Issue
Block a user