summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-15 00:35:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-15 00:35:56 +0000
commitd114bb8449a5d27ea578903319e477e2824f60bd (patch)
tree1f5c426b51d4185c560efbdb0e119cbb384ca93d
parent51a6bf4f01ed35085f4599a7139e6e848ceb75c1 (diff)
downloadpfsense-d114bb8449a5d27ea578903319e477e2824f60bd.zip
pfsense-d114bb8449a5d27ea578903319e477e2824f60bd.tar.gz
Add stop / start / restart racoon (IPSEC VPN) service option.
-rwxr-xr-xusr/local/www/status_services.php45
1 files changed, 41 insertions, 4 deletions
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php
index 26c38eb..b4a8750 100755
--- a/usr/local/www/status_services.php
+++ b/usr/local/www/status_services.php
@@ -57,6 +57,9 @@ if($_GET['mode'] == "restartservice" and $_GET['service']) {
if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
mwexec('/usr/local/etc/rc.d/miniupnpd.sh restart');
break;
+ case 'racoon':
+ exec("killall -9 racoon");
+ vpn_ipsec_configure(true);
default:
restart_service($_GET['service']);
break;
@@ -80,6 +83,9 @@ if($_GET['mode'] == "startservice" and $_GET['service']) {
if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
mwexec('/usr/local/etc/rc.d/miniupnpd.sh start');
break;
+ case 'racoon':
+ exec("killall -9 racoon");
+ vpn_ipsec_configure(true);
default:
start_service($_GET['service']);
break;
@@ -88,18 +94,42 @@ if($_GET['mode'] == "startservice" and $_GET['service']) {
sleep(5);
}
-if($_GET['mode'] == "stopservice" and $_GET['service']) {
+/* stop service */
+if($_GET['mode'] == "stopservice" && $_GET['service']) {
switch($_GET['service']) {
+ case 'bsnmpd':
+ killbypid("{$g['varrun_path']}/snmpd.pid");
+ break;
+ case 'choparp':
+ killbyname("choparp");
+ break;
+ case 'dhcpd':
+ killbyname("dhcpd");
+ break;
+ case 'dhcrelay':
+ killbypid("{$g['varrun_path']}/dhcrelay.pid");
+ break;
+ case 'dnsmasq':
+ killbypid("{$g['varrun_path']}/dnsmasq.pid");
+ break;
case 'miniupnpd':
/* can't just killbyname since we need to clear pf rules */
if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
mwexec('/usr/local/etc/rc.d/miniupnpd.sh stop');
- break;
+ break;
+ case 'ntpd':
+ killbyname("ntpd");
+ break;
+ case 'sshd':
+ killbyname("sshd");
+ break;
+ case 'racoon':
+ exec("killall -9 racoon");
default:
- stop_service($_GET['service']);
+ stop_service($_GET['service']);
break;
}
- $savemsg = "{$_GET['service']} has been stopped.";
+ $savemsg = "{$_GET['service']} " . gettext("has been stopped.");
sleep(5);
}
@@ -207,6 +237,13 @@ if($config['installedpackages']['miniupnpd']['config'][0]['enable']) {
unset($pconfig);
}
+if (isset($config['ipsec']['enable'])) {
+ $pconfig['name'] = "racoon";
+ $pconfig['description'] = gettext("IPSEC VPN");
+ $services[] = $pconfig;
+ unset($pconfig);
+}
+
if($services) {
foreach($services as $service) {
if(!$service['name']) continue;
OpenPOWER on IntegriCloud