fix port not saving

This commit is contained in:
dmacias72 2016-11-06 14:27:43 -07:00
parent ce9367b973
commit 0494a980f3
4 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ function checkRUNNING(form) {
} }
function verifyDATA(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.PORT.value = 8448;
} }
form.DAEMON.value = form.DAEMON.value.replace(/ /g,"_"); form.DAEMON.value = form.DAEMON.value.replace(/ /g,"_");

View File

@ -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']) ? //$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']; // $qcfg['host'] : $var['IPADDR'];
$gipaddr = 'localhost'; $gipaddr = 'localhost';
$gport = (isset($gcfg['port']) && is_numeric($gcfg['port']) && $gcfg['port'] > 0 && $gcfg['port'] < 65535 ) ? $gcfg['port'] : 8448; $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' ); $gversion = trim(shell_exec( 'ungit -v' ));
//check running status //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); $grunning = (trim(shell_exec( "[ -f /proc/`cat /var/run/ungit.pid 2> /dev/null`/exe ] && echo 1 || echo 0 2> /dev/null" )) == 1);

View File

View File