mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	dist/init/linux-sysvinit: execute setcap directly
`$(which setcap)` might evaluate to nothing, and this way the error thrown will be more clear. If setcap is not available on Debian/Ubuntu, you can install the package `libcap2-bin`
This commit is contained in:
		
							parent
							
								
									f3a3bf6204
								
							
						
					
					
						commit
						3a4f8e8d0c
					
				
							
								
								
									
										2
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							@ -22,7 +22,7 @@ LOGFILE=/var/log/$NAME.log
 | 
			
		||||
CONFIGFILE=/etc/caddy/Caddyfile
 | 
			
		||||
DAEMONOPTS="-agree=true -pidfile=$PIDFILE -log=$LOGFILE -conf=$CONFIGFILE"
 | 
			
		||||
 | 
			
		||||
USERBIND="$(which setcap) cap_net_bind_service=+ep"
 | 
			
		||||
USERBIND="setcap cap_net_bind_service=+ep"
 | 
			
		||||
STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
 | 
			
		||||
 | 
			
		||||
test -x $DAEMON || exit 0
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user