20 lines
483 B
Bash
20 lines
483 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Activate the virtual environment
|
||
|
source /home/youruserhere/meshtastic_forceast/venv/bin/activate
|
||
|
|
||
|
# Check if the activation was successful
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "Failed to activate virtual environment."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Run the Python script
|
||
|
python /home/youruserhere/meshtastic_forceast/main.py
|
||
|
|
||
|
# Deactivate the virtual environment when done
|
||
|
deactivate
|
||
|
|
||
|
# Optionally, you can add a message after the script finishes
|
||
|
echo "Python script execution finished."
|