0) { $pconfig['name'] = "igmpproxy"; $pconfig['descritption'] = "IGMP proxy"; $services[] = $pconfig; unset($pconfig); } if($config['installedpackages']['miniupnpd']['config'][0]['enable']) { $pconfig['name'] = "miniupnpd"; $pconfig['description'] = gettext("UPnP Service"); $services[] = $pconfig; unset($pconfig); } if (isset($config['ipsec']['enable'])) { $pconfig['name'] = "racoon"; $pconfig['description'] = gettext("IPsec VPN"); $services[] = $pconfig; unset($pconfig); } foreach (array('server', 'client') as $mode) { if (is_array($config['installedpackages']["openvpn$mode"]['config'])) { foreach ($config['installedpackages']["openvpn$mode"]['config'] as $id => $settings) { $setting = $config['installedpackages']["openvpn$mode"]['config'][$id]; if (!$setting['disable']) { $pconfig['name'] = "openvpn"; $pconfig['mode'] = $mode; $pconfig['id'] = $id; $pconfig['description'] = "OpenVPN ".$mode.": ".htmlspecialchars($setting['description']); $services[] = $pconfig; unset($pconfig); } } } } if($services) { foreach($services as $service) { if(!$service['name']) continue; if(!$service['description']) $service['description'] = get_pkg_descr($service['name']); echo ''; echo ''; if ($service['name'] == "openvpn") { $running = (is_pid_running($g['varrun_path'] . "/openvpn_{$service['mode']}{$service['id']}.pid") ); } else { $running = (is_service_running($service['name'], $ps) or is_process_running($service['name']) ); } if($running) { echo '"; } else { echo '"; } echo ''; echo ''; } } else { echo ""; } ?>
Service
Description
Status
' . $service['name'] . '' . $service['description'] . '
'; echo " Running
'; echo " Stopped
'; if($running) { if ($service['name'] == "openvpn") { echo ""; } else { echo ""; } echo " "; if ($service['name'] == "openvpn") { echo ""; } else { echo " "; } echo " "; echo ""; } else { if ($service['name'] == "openvpn") { echo ""; } else { echo " "; } echo " "; } echo '
No services found.