If you want Direwolf to always be running, even after you close your terminal, you need to run it as a service. To do so, you have to create a service file.
Use a text editor of your choice to open /etc/systemd/system/direwolf.service
Example:
sudo nano /etc/systemd/system/direwolf.service
Once you have opened the file, you need to append the text below:
[Unit]
Description=Direwolf
[Service]
User=root
Group=root
PrivateTmp=true
ExecStart=/usr/local/bin/direwolf -c /path/to/direwolf.conf
[Install]
WantedBy=multi-user.target
Be sure to replace /path/to/direwolf.conf
. It should be /home/username/direwolf/build/direwolf.conf
if you didnt specify a custom path. Be sure to replace username
with the username you used to ssh into the Pi.
Once you have populated the file, you can exit it. To save files in nano, you can push CTRL + X then push Y then hit enter.
After you have saved the file, run the command below to reload the systemctl daemon.
systemctl daemon-reload
Once you have run the daemon reload command, you can run the command below to enable Direwolf to run on boot:
systemctl enable direwolf
You can run the command below to start Direwolf:
systemctl start direwolf
You can run the command below to stop Direwolf:
systemctl stop direwolf
You can run the command below to restart Direwolf:
systemctl restart direwolf
And finally, you can run the command below to check the status of Direwolf:
systemctl status direwolf
If you have any issues, please dont hesitate to reach out to me at tavas@kd9nsc.com