Created
November 22, 2023 17:28
-
-
Save bjpetit/0cee2ca37ac97695692c62b2c81fbba2 to your computer and use it in GitHub Desktop.
Systemd file for direwolf
This file contains 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
[Unit] | |
Description=Direwolf %i Service | |
Documentation=https://github.com/wb2osz/direwolf/blob/dev/doc/README.md | |
After=network-online.target | |
Requires=rigctld.service | |
After=rigctld.service | |
[Service] | |
Type=simple | |
User=pi | |
Group=pi | |
WorkingDirectory=/opt/direwolf/ | |
ExecStart=/usr/local/bin/direwolf -a 200 -qd -c config/direwolf-%i.conf | |
Restart=always | |
RestartSec=15 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This systemd file can be used to automatically start/restart direwolf. The base assumptions in this file are
a. The syntax for starting services is 'systemctl start direwolf@argument', where argument is a unique name for this instance of the direwolf service.
- This systemd service file must be named 'direwolf@.service' to support named instances.
b. The argument is then used in the systemd file where the %i variables are seen.
c. For example, if a direwolf service is started using the command 'systemctl start direwolf@vhf', the systemd service will start direwolf using a config file named direwolf-vhf.conf (located in /opt/direwolf/config).
This service will automatically restart direwolf if it stops. It currently requires and waits for a rigctld service to start so that PTT works. If you do not use rigctld, then you can remove the two lines referring to rigctld.service.
This service currently runs direwolf as the user/group pi, rather than root. If you would like to run as another user, change the User and Group lines to the desired account names.
This will also send all direwolf output to the journald service. To look at direwolf logs, run the 'journalctl -u direwolf@argument' command. Journalctl has numerous options for specifying time ranges and can follow updates to the file (like tail -f) using the -f argument. Journalctl will automatically manage log files, cleaning them up based on the systems logging settings.