Created
August 5, 2025 03:08
-
-
Save Nexarian/4e349443c1ed52ce3dfc27675580708b to your computer and use it in GitHub Desktop.
Start Nanny
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
export ENV_NAME="nanny-env" | |
export PYENV_ROOT="/home/christopher/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
# Install Python 3.13.3 if not already installed | |
if ! pyenv versions | grep -q "3.13.1"; then | |
echo "Installing Python 3.13.1..." | |
pyenv install 3.13.1 | |
fi | |
# Only create if it doesn't exist | |
if ! pyenv versions | grep -q "$ENV_NAME"; then | |
pyenv virtualenv 3.13.1 $ENV_NAME | |
fi | |
# Use the virtualenv directly to avoid activation issues | |
export PYTHON_BIN="$PYENV_ROOT/versions/$ENV_NAME/bin/python" | |
export PIP_BIN="$PYENV_ROOT/versions/$ENV_NAME/bin/pip" | |
$PIP_BIN install --quiet --disable-pip-version-check -r /home/christopher/tesla-solar-reporter/wifi_nanny/requirements.txt | |
# Start with full Python path | |
screen -dmS network-nanny $PYTHON_BIN /home/christopher/tesla-solar-reporter/wifi_nanny/nanny.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment