mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-03 18:55:08 +03:00 
			
		
		
		
	contrib/busybox-init: add reload and use -useconffile
+ Added reload command. + Use -useconffile instead, as it's required for reloading.
This commit is contained in:
		
							parent
							
								
									03b5261f1c
								
							
						
					
					
						commit
						f4ccbe6c94
					
				
					 1 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -34,8 +34,8 @@ start() {
 | 
			
		|||
	fi
 | 
			
		||||
 | 
			
		||||
	printf 'Starting yggdrasil: '
 | 
			
		||||
	if start-stop-daemon -S -b -x /usr/bin/yggdrasil \
 | 
			
		||||
		-- --useconf < "$CONFFILE"; then
 | 
			
		||||
	if start-stop-daemon -S -q -b -x /usr/bin/yggdrasil \
 | 
			
		||||
		-- -useconffile "$CONFFILE"; then
 | 
			
		||||
		echo "OK"
 | 
			
		||||
	else
 | 
			
		||||
		echo "FAIL"
 | 
			
		||||
| 
						 | 
				
			
			@ -51,20 +51,26 @@ stop() {
 | 
			
		|||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
reload() {
 | 
			
		||||
	printf "Reloading yggdrasil: "
 | 
			
		||||
	if start-stop-daemon -K -q -s HUP -x /usr/bin/yggdrasil; then
 | 
			
		||||
		echo "OK"
 | 
			
		||||
	else
 | 
			
		||||
		echo "FAIL"
 | 
			
		||||
		start
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
restart() {
 | 
			
		||||
	stop
 | 
			
		||||
	start
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
reload() {
 | 
			
		||||
	restart
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
case "$1" in
 | 
			
		||||
	start|stop|restart|reload)
 | 
			
		||||
		"$1";;
 | 
			
		||||
	*)
 | 
			
		||||
		echo "Usage: $0 {start|stop|restart}"
 | 
			
		||||
		echo "Usage: $0 {start|stop|restart|reload}"
 | 
			
		||||
		exit 1
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue