mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			[no-ci] overlay-files: update rc.local init script (#1102)
							parent
							
								
									311b619110
								
							
						
					
					
						commit
						69bd0ec5c5
					
				|  | @ -3,7 +3,6 @@ | ||||||
| # Start rc.local | # Start rc.local | ||||||
| # | # | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| start() { | start() { | ||||||
| 	echo "Starting rc.local" | 	echo "Starting rc.local" | ||||||
| 	/etc/rc.local | 	/etc/rc.local | ||||||
|  | @ -14,16 +13,25 @@ restart() { | ||||||
| 	/etc/rc.local | 	/etc/rc.local | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | stop() { | ||||||
|  | 	echo "Stopping rc.local" | ||||||
|  | 	# Check if rc.local.stop exists and if so, execute it | ||||||
|  | 	if [ -x /etc/rc.local.stop ]; then | ||||||
|  | 		/etc/rc.local.stop | ||||||
|  | 	else | ||||||
|  | 		echo "/etc/rc.local.stop not found or not executable." | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  | 
 | ||||||
| case "$1" in | case "$1" in | ||||||
| 	start) | 	start) | ||||||
| 		"$1" |  | ||||||
| 		;; |  | ||||||
| 
 |  | ||||||
| 	restart|reload) |  | ||||||
| 		start | 		start | ||||||
| 		;; | 		;; | ||||||
|  | 	restart|reload) | ||||||
|  | 		restart | ||||||
|  | 		;; | ||||||
| 	stop) | 	stop) | ||||||
| 		# Intentionally left blank, no need to stop rc.local | 		stop | ||||||
| 		;; | 		;; | ||||||
| 	*) | 	*) | ||||||
| 		echo "Usage: $0 {start|stop|restart|reload}" | 		echo "Usage: $0 {start|stop|restart|reload}" | ||||||
		Loading…
	
		Reference in New Issue