fix port not saving
This commit is contained in:
		| @@ -91,7 +91,7 @@ function checkRUNNING(form) { | ||||
| } | ||||
|  | ||||
| function verifyDATA(form) { | ||||
|     if (form.PORT.value < 0 || form.PORT.value > 65535){ | ||||
|     if (form.PORT.value < 0 || form.PORT.value > 65535 || form.PORT.value == ''){ | ||||
|         form.PORT.value = 8448; | ||||
|     } | ||||
|     form.DAEMON.value = form.DAEMON.value.replace(/ /g,"_"); | ||||
|   | ||||
| @@ -7,8 +7,8 @@ $gdaemon = isset($gcfg['DAEMON']) ? $gcfg['DAEMON'] : "disable"; | ||||
| //$qipaddr = preg_match('/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/', $ipmi_cfg['host']) ? | ||||
| //    $qcfg['host'] : $var['IPADDR']; | ||||
| $gipaddr = 'localhost'; | ||||
| $gport   = (isset($gcfg['port']) && is_numeric($gcfg['port']) && $gcfg['port'] > 0 && $gcfg['port'] < 65535 ) ? $gcfg['port'] : 8448; | ||||
| $gversion = shell_exec( '/usr/local/emhttp/plugins/ungit/node_modules/ungit/bin/ungit -v' ); | ||||
| $gport   = (isset($gcfg['PORT']) && is_numeric($gcfg['PORT']) && $gcfg['PORT'] > 0 && $gcfg['PORT'] < 65535 ) ? $gcfg['PORT'] : 8448; | ||||
| $gversion = trim(shell_exec( 'ungit -v' )); | ||||
|  | ||||
| //check running status | ||||
| $grunning = (trim(shell_exec( "[ -f /proc/`cat /var/run/ungit.pid 2> /dev/null`/exe ] && echo 1 || echo 0 2> /dev/null" )) == 1); | ||||
|   | ||||
							
								
								
									
										0
									
								
								source/ungit/usr/local/emhttp/plugins/ungit/scripts/start
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								source/ungit/usr/local/emhttp/plugins/ungit/scripts/start
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								source/ungit/usr/local/emhttp/plugins/ungit/scripts/stop
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								source/ungit/usr/local/emhttp/plugins/ungit/scripts/stop
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
		Reference in New Issue
	
	Block a user