Skip to content

Commit

Permalink
docs: README: use systemd to start saxi on the pi (#181)
Browse files Browse the repository at this point in the history
This patch adds documentation for starting saxi as a systemd unit
on the Raspberry Pi so that it runs at boot time and will restart if
the process exits for some reason.

Signed-off-by: Trammell Hudson <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
  • Loading branch information
osresearch and nornagon authored Apr 2, 2024
1 parent 0b42938 commit 9b6829e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@ $ sudo apt-get install -y nodejs

and then proceed as above :) If you connect to the raspberry pi over ssh, you might want to run the `saxi` server inside a tmux or screen session to have it stay running even if your ssh session disconnects.

If you want `saxi` to run at boot on the Pi you can use a systemd unit file and enable the service:

```bash
sudo tee /lib/systemd/system/saxi.service <<EOF
[Unit]
Description=Saxi
After=network.target
[Service]
ExecStart=saxi
Restart=always
User=pi
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable saxi.service
```

To watch the logs while it is running, use:
```bash
journalctl -f -u saxi
```

#### Raspberry Pi Zero OTG

![Pi Zero on an AxiDraw with a Y-shaped USB cable](docs/pi-zero.jpg)
Expand Down

0 comments on commit 9b6829e

Please sign in to comment.