[Unit] Description=Arm Server (TCP 5002 + Camera 5003) After=network-online.target Wants=network-online.target [Service] Type=simple User=pi EnvironmentFile=-/etc/default/arm_server ExecStartPre=/bin/sleep 5 ExecStart=/bin/bash -lc 'export PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin:$PATH"; cd "${ARM_SERVER_DIR:-$HOME/work/smart-inspection/arm_server}" && exec uv run --locked python arm_server.py' Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target