Fix variable name typo in status_services.php and fix return value of is_pid_running. Fixes #877

This commit is contained in:
Erik Fonnesbeck 2010-09-07 22:03:24 -06:00
parent 392687e563
commit 22d323b338
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ function is_pid_running($pidfile) {
return false;
$running = shell_exec("/bin/pgrep -F {$pidfile} 2>/dev/null");
return (intval($running) == 0);
return (!empty($running));
}
function is_dhcp_running($interface) {

View File

@ -328,7 +328,7 @@ foreach (array('server', 'client') as $mode) {
$pconfig['name'] = "openvpn";
$pconfig['mode'] = $mode;
$pconfig['id'] = $id;
$pconfig['vpnid'] = $settings['vpnid'];
$pconfig['vpnid'] = $setting['vpnid'];
$pconfig['description'] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']);
$services[] = $pconfig;
}