Skip to content

Various improvements to the systemd unit #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions systemd/direwolf.logrotate
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/var/log/direwolf/stdout /var/log/direwolf/stderr {
missingok
rotate 30
daily
copytruncate
notifempty
compress
delaycompress
dateext
dateyesterday
}

/var/log/direwolf/*.log {
missingok
daily
Expand Down
5 changes: 1 addition & 4 deletions systemd/direwolf.service
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ User=direwolf
# doing so. Then run systemctl daemon-reload so systemd uses your updated
# copy of this service file.
#ExecStartPre=/some/script.sh
ExecStart=/bin/bash -ce "exec /usr/bin/direwolf $DIREWOLF_ARGS >>/var/log/direwolf/stdout 2>>/var/log/direwolf/stderr"
ExecStart=/usr/bin/direwolf $DIREWOLF_ARGS
Restart=always
StandardOutput=null
StandardError=null
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/direwolf

[Install]
WantedBy=multi-user.target
DefaultInstance=1

# alternate version: https://www.f4fxl.org/start-direwolf-at-boot-the-systemd-way/
4 changes: 4 additions & 0 deletions systemd/direwolf.sysusers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Type Name ID GECOS Home directory Shell
u direwolf -:audio 'Direwolf Sound Card-based AX.25 TNC' /usr/share/direwolf -
m direwolf audio
m direwolf dialout