Added custom systemd service file for Caddy
This commit is contained in:
		
							
								
								
									
										24
									
								
								caddy-webserver.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								caddy-webserver.service
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Caddy webserver
 | 
				
			||||||
 | 
					After=network-online.target
 | 
				
			||||||
 | 
					Wants=network-online.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					Type=forking
 | 
				
			||||||
 | 
					User=caddy
 | 
				
			||||||
 | 
					Group=caddy
 | 
				
			||||||
 | 
					ExecStartPre=/usr/bin/caddy validate --config /srv/www/Caddyfile
 | 
				
			||||||
 | 
					ExecStart=/usr/bin/caddy start --config /srv/www/Caddyfile
 | 
				
			||||||
 | 
					ExecReload=/usr/bin/caddy reload --config /srv/www/Caddyfile
 | 
				
			||||||
 | 
					ExecStop=/usr/bin/caddy stop
 | 
				
			||||||
 | 
					TimeoutStopSec=5s
 | 
				
			||||||
 | 
					LimitNOFILE=1048576
 | 
				
			||||||
 | 
					LimitNPROC=512
 | 
				
			||||||
 | 
					PrivateTmp=true
 | 
				
			||||||
 | 
					ProtectHome=full
 | 
				
			||||||
 | 
					ProtectSystem=full
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					#RemainAfterExit=yes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
		Reference in New Issue
	
	Block a user