mirror of https://github.com/wb2osz/direwolf.git
				
				
				
			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
This commit is contained in:
		
							parent
							
								
									5736b0f601
								
							
						
					
					
						commit
						e99d2c0c92
					
				| 
						 | 
					@ -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 {
 | 
					/var/log/direwolf/*.log {
 | 
				
			||||||
    missingok
 | 
					    missingok
 | 
				
			||||||
    daily
 | 
					    daily
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,16 +12,13 @@ User=direwolf
 | 
				
			||||||
# doing so.  Then run systemctl daemon-reload so systemd uses your updated
 | 
					# doing so.  Then run systemctl daemon-reload so systemd uses your updated
 | 
				
			||||||
# copy of this service file.
 | 
					# copy of this service file.
 | 
				
			||||||
#ExecStartPre=/some/script.sh
 | 
					#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
 | 
					Restart=always
 | 
				
			||||||
StandardOutput=null
 | 
					 | 
				
			||||||
StandardError=null
 | 
					 | 
				
			||||||
ProtectSystem=strict
 | 
					ProtectSystem=strict
 | 
				
			||||||
ProtectHome=true
 | 
					ProtectHome=true
 | 
				
			||||||
ReadWritePaths=/var/log/direwolf
 | 
					ReadWritePaths=/var/log/direwolf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Install]
 | 
					[Install]
 | 
				
			||||||
WantedBy=multi-user.target
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
DefaultInstance=1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# alternate version:  https://www.f4fxl.org/start-direwolf-at-boot-the-systemd-way/
 | 
					# alternate version:  https://www.f4fxl.org/start-direwolf-at-boot-the-systemd-way/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
		Loading…
	
		Reference in New Issue