--- orig/status_services.php	2013-02-22 15:37:14.000000000 +0100
+++ new/status_services.php	2013-02-22 15:37:18.000000000 +0100
@@ -68,6 +68,10 @@
 			killbypid("{$g['varrun_path']}/lighty-CaptivePortal-SSL.pid");
 			captiveportal_init_webgui();
 			break;
+		case 'cp_univnautes':
+		case 'univnautes_idp':
+			mwexec_bg("/usr/local/etc/rc.d/univnautes.sh restart");
+			break;
 		case 'ntpd':
 		case 'openntpd':
 			system_ntp_configure();
@@ -115,6 +119,12 @@
 		case 'captiveportal':
 			captiveportal_init_webgui();
 			break;
+		case 'cp_univnautes':
+			mwexec_bg("/usr/local/etc/rc.d/univnautes.sh _start_portal");
+			break;
+		case 'univnautes_idp':
+			mwexec_bg("/usr/local/etc/rc.d/univnautes.sh _start_idp");
+			break;
 		case 'ntpd':
 		case 'openntpd':
 			system_ntp_configure();
@@ -164,6 +174,12 @@
 			killbypid("{$g['varrun_path']}/lighty-CaptivePortal.pid");
 			killbypid("{$g['varrun_path']}/lighty-CaptivePortal-SSL.pid");
 			break;
+		case 'cp_univnautes':
+			mwexec_bg("/usr/local/etc/rc.d/univnautes.sh _stop_portal");
+			break;
+		case 'univnautes_idp':
+			mwexec_bg("/usr/local/etc/rc.d/univnautes.sh _stop_idp");
+			break;
 		case 'ntpd':
 			killbyname("ntpd");
 			break;		
@@ -267,10 +283,24 @@
 $services[] = $pconfig;
 
 if(isset($config['captiveportal']['enable'])) {
+	/* not used in Univnautes
 	$pconfig = array();
 	$pconfig['name'] = "captiveportal";
-	$pconfig['description'] = gettext("Captive Portal");
+	$pconfig['description'] = gettext("Captive Portal (http redirection)");
 	$services[] = $pconfig;
+	 */
+
+	$pconfig = array();
+        $pconfig['name'] = "cp_univnautes";
+        $pconfig['description'] = gettext("Captive Portal (UnivNautes)");
+	$services[] = $pconfig;
+
+	if($config['installedpackages']['univnautes']['config'][0]['enableidp']) {
+		$pconfig = array();
+		$pconfig['name'] = "univnautes_idp";
+		$pconfig['description'] = gettext("Local IdP (UnivNautes)");
+		$services[] = $pconfig;
+	}
 }
 
 $iflist = array();
@@ -369,7 +399,11 @@
 		if ($service['name'] == "openvpn")
 			$running = is_pid_running("{$g['varrun_path']}/openvpn_{$service['mode']}{$service['vpnid']}.pid");
 		else if ($service['name'] == "captiveportal")
-			$running = is_pid_running("{$g['varrun_path']}/lighty-CaptivePortal.pid");
+			$running = is_pid_running("{$g['varrun_path']}/lighty-CaptivePortal-SSL.pid");
+		else if ($service['name'] == "cp_univnautes")
+			$running = is_pid_running("{$g['varrun_path']}/pffedportal-fcgi.pid");
+		else if ($service['name'] == "univnautes_idp")
+			$running = is_pid_running("{$g['varrun_path']}/pfidp-fcgi.pid");
 		else
 			$running = is_service_running($service['name']);
 		if($running) {
