Last active
August 5, 2024 15:09
-
-
Save bjpetit/983d9fc139289752985ac2d97633f3b3 to your computer and use it in GitHub Desktop.
Simple systemd file for direwolf
This file contains hidden or 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 Sound Card-based AX.25 TNC | |
After=network.target | |
After=sound.target | |
[Service] | |
Type=simple | |
User=pi | |
Group=pi | |
WorkingDirectory=/opt/direwolf/ | |
# -t 1 will preserve color. Use -all option in journalctl | |
ExecStart=/usr/local/bin/direwolf -t 1 -a 600 -c direwolf.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 service file can automatically start/restart direwolf. It makes a couple assumptions.
/opt/direwolf
. If you need to place your direwolf.conf file in another directory, update theWorkingDirectory
line with the desired directory path.User
and/orGroup
lines to reflect the account that will run the program.To add this service to your system, copy it into
/lib/systemd/system/
After adding this service file, or updating this service file, the service info must be reloaded.
To do this, run
sudo systemctl daemon-reload
To manage this service use the following commands.
To start the direwolf service run
sudo systemctl start direwolf
To stop the direwolf service run
sudo systemctl stop direwolf
To configure the direwolf service to start automatically on boot run
sudo systemctl enable direwolf
To configure the direwolf service to NOT start automatically on boot run
sudo systemctl disable direwolf
To look at the current status of the direwolf service, run
sudo systemctl status direwolf
To see the direwolf logs, use the
journalctl -u direwolf
command. See the journalctl man page for additional options.For example, the -f flag can be used to 'follow' the log for continuous updates. To watch direwolf logs in real-time, run the following command.
journalctl -u direwolf -f