Update install.sh

This commit is contained in:
SpudGunMan
2024-09-25 22:26:37 -07:00
parent 87e51cf9f9
commit 8369b4d205
+10 -10
View File
@@ -35,21 +35,12 @@ printf "\nConfig file generated\n"
# set virtual environment and install dependencies
printf "\nMeshing Around Installer\n"
#check if python3 has venv module
if [ -f venv/bin/activate ]; then
printf "\nFpund virtual environment for python\n"
else
sudo apt-get install python3-venv
exit 1
fi
echo "Do you want to install the bot in a virtual environment? (y/n)"
read venv
if [ $venv == "y" ]; then
# set virtual environment
if ! python3 -m venv --help &> /dev/null
then
if ! python3 -m venv --help &> /dev/null; then
printf "Python3 venv module not found, please install python3-venv with your OS\n"
exit 1
else
@@ -57,6 +48,15 @@ if [ $venv == "y" ]; then
python3 -m venv venv
source venv/bin/activate
#check if python3 has venv module
if [ -f venv/bin/activate ]; then
printf "\nFpund virtual environment for python\n"
else
sudo apt-get install python3-venv
printf "\nPython3 venv module not found, please install python3-venv with your OS if not already done. re-run the script\n"
exxt 1
fi
# config service files for virtual environment
replace="python3 mesh_bot.py|/dir/launch.sh mesh"
sed -i $replace etc/mesh_bot.service