gluon-core: force kernel panic on out of memory
In combination with kernel.panic the node will reboot if out of memory.
This commit is contained in:
		
							parent
							
								
									c2adf36e20
								
							
						
					
					
						commit
						6f302fc8df
					
				
							
								
								
									
										4
									
								
								package/gluon-core/files/lib/gluon/functions/sysctl.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								package/gluon-core/files/lib/gluon/functions/sysctl.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | sysctl_set() { | ||||||
|  |   sed -i "/^${1//./\.}=/d" /etc/sysctl.conf  | ||||||
|  |   echo "${1}=$2" >> /etc/sysctl.conf | ||||||
|  | } | ||||||
| @ -0,0 +1,5 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | . /lib/gluon/functions/sysctl.sh | ||||||
|  | 
 | ||||||
|  | sysctl_set vm.panic_on_oom 1 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user