[Unit] Description=Astrape Local Weather Station Ingest After=network-online.target Wants=network-online.target [Service] Type=simple User=gibil Group=gibil WorkingDirectory=/srv/astrape Environment=PYTHONUNBUFFERED=1 Environment=PYTHONDONTWRITEBYTECODE=1 # WorkingDirectory is /srv/astrape, which also holds the gibil checkout. Without # this, Python prepends the working directory to sys.path and the repo root # /srv/astrape/gibil shadows the installed package as a namespace portion -- # gibil.__file__ becomes None and imports work only by accident. All code is # installed into the venv, so nothing needs the working directory on sys.path. Environment=PYTHONSAFEPATH=1 Environment=ECOWITT_GW3000_HOST=10.24.88.176 Environment=ECOWITT_GW3000_POLL_SECONDS=60 ExecStart=/srv/astrape/.venv/bin/python -m astrape_oracle.scripts.daemons.weather_station_daemon Restart=always RestartSec=10 [Install] WantedBy=multi-user.target