mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	Fix linux-sysvinit script to prevent missing caddy.log
Create /var/log/caddy.log and chown prior to starting caddy. Caddy running as DAEMONUSER does not have permission to create the /var/log/caddy.log.
This commit is contained in:
		
							parent
							
								
									a808252079
								
							
						
					
					
						commit
						fea8f37f9d
					
				
							
								
								
									
										1
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							@ -36,6 +36,7 @@ ulimit -n 8192
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
start() {
 | 
					start() {
 | 
				
			||||||
    $USERBIND $DAEMON
 | 
					    $USERBIND $DAEMON
 | 
				
			||||||
 | 
					    touch $LOGFILE && chown $DAEMONUSER $LOGFILE
 | 
				
			||||||
    start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
 | 
					    start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
 | 
				
			||||||
        --background --chuid $DAEMONUSER --oknodo --exec $DAEMON -- $DAEMONOPTS
 | 
					        --background --chuid $DAEMONUSER --oknodo --exec $DAEMON -- $DAEMONOPTS
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user