#!/usr/local/bin/php-cgi -f

<?php

require_once("config.inc");
require_once("functions.inc");
require_once("shaper.inc");
require_once("captiveportal.inc");
require_once("rrd.inc");

echo "Restarting webConfigurator...";

/* Stop all running nginx processes */
$pidfiles = glob("{$g['varrun_path']}/nginx*.pid");

foreach ($pidfiles as $pidfile) {
	killbypid($pidfile);
}

system_webgui_start();

captiveportal_init_webgui();

enable_rrd_graphing();

echo " done.\n\n";

?>
