Running raspi-blinka.py as sudo

This commit is contained in:
K 2024-10-07 01:01:39 +05:30
parent e15f80d0c6
commit b8742e6cdb
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -72,7 +72,7 @@ else
fi fi
# Create and activate Python virtual environment # Create and activate Python virtual environment
cd "$PROJECT_DIR" cd "$PROJECT_DIR/"
chmod ugo+x ./raspi-blinka.py ./temp-calc.py chmod ugo+x ./raspi-blinka.py ./temp-calc.py
python3 -m venv . --system-site-packages python3 -m venv . --system-site-packages
echo -e "$line\nVirtual environment created.\n$line\n" echo -e "$line\nVirtual environment created.\n$line\n"
@ -83,7 +83,7 @@ echo -e "$line\nInstalling dependencies...\n$line\n"
pip3 install --upgrade setuptools click adafruit-python-shell adafruit-circuitpython-dht pip3 install --upgrade setuptools click adafruit-python-shell adafruit-circuitpython-dht
echo -e "$line\nSetting up raspi-blinka...\n$line\n" echo -e "$line\nSetting up raspi-blinka...\n$line\n"
python3 raspi-blinka.py sudo python3 raspi-blinka.py
echo -e "\n\n\n$line$line$line\nSetup completed.\nExecute the command 'python3 temp-calc.py' to calculate\nthe temperature.\n# DESIGNED AND ENGINEERED BY KSHITIJ.\n# END OF SCRIPT\n$line$line$line\n\n\n" echo -e "\n\n\n$line$line$line\nSetup completed.\nExecute the command 'python3 temp-calc.py' to calculate\nthe temperature.\n# DESIGNED AND ENGINEERED BY KSHITIJ.\n# END OF SCRIPT\n$line$line$line\n\n\n"