mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	contrib/openrc: add reload command
This commit is contained in:
		
							parent
							
								
									26a952aa6c
								
							
						
					
					
						commit
						1097c1c0c9
					
				
					 1 changed files with 10 additions and 3 deletions
				
			
		| 
						 | 
					@ -6,6 +6,7 @@ CONFFILE="/etc/yggdrasil.conf"
 | 
				
			||||||
pidfile="/run/${RC_SVCNAME}.pid"
 | 
					pidfile="/run/${RC_SVCNAME}.pid"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
command="/usr/bin/yggdrasil"
 | 
					command="/usr/bin/yggdrasil"
 | 
				
			||||||
 | 
					extra_started_commands="reload"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
depend() {
 | 
					depend() {
 | 
				
			||||||
	use net dns logger
 | 
						use net dns logger
 | 
				
			||||||
| 
						 | 
					@ -31,19 +32,25 @@ start_pre() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
start() {
 | 
					start() {
 | 
				
			||||||
	ebegin "Starting Yggdrasil"
 | 
						ebegin "Starting ${RC_SVCNAME}"
 | 
				
			||||||
	start-stop-daemon --start --quiet \
 | 
						start-stop-daemon --start --quiet \
 | 
				
			||||||
		--pidfile "${pidfile}" \
 | 
							--pidfile "${pidfile}" \
 | 
				
			||||||
		--make-pidfile \
 | 
							--make-pidfile \
 | 
				
			||||||
		--background \
 | 
							--background \
 | 
				
			||||||
		--stdout /var/log/yggdrasil.stdout.log \
 | 
							--stdout /var/log/yggdrasil.stdout.log \
 | 
				
			||||||
		--stderr /var/log/yggdrasil.stderr.log \
 | 
							--stderr /var/log/yggdrasil.stderr.log \
 | 
				
			||||||
		--exec "${command}" -- -useconf < "${CONFFILE}"
 | 
							--exec "${command}" -- -useconffile "${CONFFILE}"
 | 
				
			||||||
 | 
						eend $?
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					reload() {
 | 
				
			||||||
 | 
						ebegin "Reloading ${RC_SVCNAME}"
 | 
				
			||||||
 | 
						start-stop-daemon --signal HUP --pidfile "${pidfile}"
 | 
				
			||||||
	eend $?
 | 
						eend $?
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stop() {
 | 
					stop() {
 | 
				
			||||||
	ebegin "Stopping Yggdrasil"
 | 
						ebegin "Stopping ${RC_SVCNAME}"
 | 
				
			||||||
	start-stop-daemon --stop --pidfile "${pidfile}" --exec "${command}"
 | 
						start-stop-daemon --stop --pidfile "${pidfile}" --exec "${command}"
 | 
				
			||||||
	eend $?
 | 
						eend $?
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue