Skip to content

Commit e99d2c0

Browse files
committed
Various improvements to the systemd unit
- Use the Journal to log stdout/stderr - Drop DefaultInstance, it doesn't do anything in non-template units - Add sysusers config to manage the direwolf user automatically
1 parent 5736b0f commit e99d2c0

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

systemd/direwolf.logrotate

-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
/var/log/direwolf/stdout /var/log/direwolf/stderr {
2-
missingok
3-
rotate 30
4-
daily
5-
copytruncate
6-
notifempty
7-
compress
8-
delaycompress
9-
dateext
10-
dateyesterday
11-
}
12-
131
/var/log/direwolf/*.log {
142
missingok
153
daily

systemd/direwolf.service

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ User=direwolf
1212
# doing so. Then run systemctl daemon-reload so systemd uses your updated
1313
# copy of this service file.
1414
#ExecStartPre=/some/script.sh
15-
ExecStart=/bin/bash -ce "exec /usr/bin/direwolf $DIREWOLF_ARGS >>/var/log/direwolf/stdout 2>>/var/log/direwolf/stderr"
15+
ExecStart=/usr/bin/direwolf $DIREWOLF_ARGS
1616
Restart=always
17-
StandardOutput=null
18-
StandardError=null
1917
ProtectSystem=strict
2018
ProtectHome=true
2119
ReadWritePaths=/var/log/direwolf
2220

2321
[Install]
2422
WantedBy=multi-user.target
25-
DefaultInstance=1
2623

2724
# alternate version: https://www.f4fxl.org/start-direwolf-at-boot-the-systemd-way/

systemd/direwolf.sysusers

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#Type Name ID GECOS Home directory Shell
2+
u direwolf -:audio 'Direwolf Sound Card-based AX.25 TNC' /usr/share/direwolf -
3+
m direwolf audio
4+
m direwolf dialout

0 commit comments

Comments
 (0)