mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	Make CADDYPATH equal across init scripts
See also https://github.com/mholt/caddy/pull/1272#issue-191256343
This commit is contained in:
		
							parent
							
								
									6cabc9bfe3
								
							
						
					
					
						commit
						956266cd79
					
				
							
								
								
									
										2
									
								
								dist/init/linux-sysvinit/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/init/linux-sysvinit/README.md
									
									
									
									
										vendored
									
									
								
							@ -6,6 +6,6 @@ Usage
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* Download the appropriate Caddy binary in `/usr/local/bin/caddy` or use `curl https://getcaddy.com | bash`.
 | 
					* Download the appropriate Caddy binary in `/usr/local/bin/caddy` or use `curl https://getcaddy.com | bash`.
 | 
				
			||||||
* Save the SysVinit config file in `/etc/init.d/caddy`.
 | 
					* Save the SysVinit config file in `/etc/init.d/caddy`.
 | 
				
			||||||
* Ensure that the folder `/etc/caddy` exists and that the subfolder `ssl` is owned by `www-data`.
 | 
					* Ensure that the folder `/etc/caddy` exists and that the folder `/etc/ssl/caddy` is owned by `www-data`.
 | 
				
			||||||
* Create a Caddyfile in `/etc/caddy/Caddyfile`
 | 
					* Create a Caddyfile in `/etc/caddy/Caddyfile`
 | 
				
			||||||
* Now you can use `service caddy start|stop|restart|reload|status` as `root`.
 | 
					* Now you can use `service caddy start|stop|restart|reload|status` as `root`.
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/init/linux-sysvinit/caddy
									
									
									
									
										vendored
									
									
								
							@ -28,7 +28,7 @@ STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
 | 
				
			|||||||
test -x $DAEMON || exit 0
 | 
					test -x $DAEMON || exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set the CADDYPATH; Let's Encrypt certificates will be written to this directory.
 | 
					# Set the CADDYPATH; Let's Encrypt certificates will be written to this directory.
 | 
				
			||||||
export CADDYPATH=/etc/caddy/ssl
 | 
					export CADDYPATH=/etc/ssl/caddy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set the ulimits
 | 
					# Set the ulimits
 | 
				
			||||||
ulimit -n 8192
 | 
					ulimit -n 8192
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								dist/init/linux-upstart/caddy.conf
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/init/linux-upstart/caddy.conf
									
									
									
									
										vendored
									
									
								
							@ -14,12 +14,12 @@ respawn limit 10 5
 | 
				
			|||||||
reload signal SIGUSR1
 | 
					reload signal SIGUSR1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Let's Encrypt certificates will be written to this directory.
 | 
					# Let's Encrypt certificates will be written to this directory.
 | 
				
			||||||
env CADDYPATH=/etc/caddy
 | 
					env CADDYPATH=/etc/ssl/caddy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
limit nofile 1048576 1048576
 | 
					limit nofile 1048576 1048576
 | 
				
			||||||
 | 
					
 | 
				
			||||||
script
 | 
					script
 | 
				
			||||||
        cd /etc/caddy
 | 
					        cd /etc/ssl/caddy
 | 
				
			||||||
        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
					        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
				
			||||||
        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
					        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
				
			||||||
end script
 | 
					end script
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								dist/init/linux-upstart/caddy.conf.centos-6
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/init/linux-upstart/caddy.conf.centos-6
									
									
									
									
										vendored
									
									
								
							@ -17,12 +17,12 @@ respawn limit 10 5
 | 
				
			|||||||
reload signal SIGUSR1
 | 
					reload signal SIGUSR1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Let's Encrypt certificates will be written to this directory.
 | 
					# Let's Encrypt certificates will be written to this directory.
 | 
				
			||||||
env CADDYPATH=/etc/caddy
 | 
					env CADDYPATH=/etc/ssl/caddy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
limit nofile 1048576 1048576
 | 
					limit nofile 1048576 1048576
 | 
				
			||||||
 | 
					
 | 
				
			||||||
script
 | 
					script
 | 
				
			||||||
        cd /etc/caddy
 | 
					        cd /etc/ssl/caddy
 | 
				
			||||||
        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
					        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
				
			||||||
        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
					        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
				
			||||||
end script
 | 
					end script
 | 
				
			||||||
 | 
				
			|||||||
@ -15,12 +15,12 @@ respawn limit 10 5
 | 
				
			|||||||
#reload signal SIGUSR1
 | 
					#reload signal SIGUSR1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Let's Encrypt certificates will be written to this directory.
 | 
					# Let's Encrypt certificates will be written to this directory.
 | 
				
			||||||
env CADDYPATH=/etc/caddy
 | 
					env CADDYPATH=/etc/ssl/caddy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
limit nofile 1048576 1048576
 | 
					limit nofile 1048576 1048576
 | 
				
			||||||
 | 
					
 | 
				
			||||||
script
 | 
					script
 | 
				
			||||||
        cd /etc/caddy
 | 
					        cd /etc/ssl/caddy
 | 
				
			||||||
        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
					        rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
 | 
				
			||||||
        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
					        exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
 | 
				
			||||||
end script
 | 
					end script
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user