mirror of
				https://github.com/KevinMidboe/keyboard-dashboard-autostart.git
				synced 2025-10-29 17:50:18 +00:00 
			
		
		
		
	systemd service template & README configuration explanation
This commit is contained in:
		
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							| @@ -48,4 +48,18 @@ Install python dependencies: | |||||||
| pip3 install -r requirements.txt | pip3 install -r requirements.txt | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | ## Setup systemd service | ||||||
|  |  | ||||||
|  | Copy the systemd template & activate it: | ||||||
|  |  | ||||||
|  | ```bash | ||||||
|  | (sudo) cp templates/keyboard-autostart.service /etc/systemd/system/ | ||||||
|  | (sudo) systemctl enable keyboard-autostart.service | ||||||
|  | (sudo) systemctl start keyboard-autostart.service | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | ### View application logs | ||||||
|  |  | ||||||
|  | ``` | ||||||
|  | (sudo) journalctl -u keyboard-autostart.service | ||||||
|  | ``` | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								templates/keyboard-autostart.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/keyboard-autostart.service
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | [Unit] | ||||||
|  | Description=Keyboard autostart service | ||||||
|  | After=multi-user.target | ||||||
|  |  | ||||||
|  | [Service] | ||||||
|  | Type=simple | ||||||
|  | Restart=always | ||||||
|  | RestartSec=5s | ||||||
|  | ExecStart=/opt/keyboard-autostart/env/bin/python3 -u /opt/keyboard-autostart/main.py | ||||||
|  |  | ||||||
|  | [Install] | ||||||
|  | WantedBy=multi-user.target | ||||||
|  | RequiredBy=network.target | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user