summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-15 00:36:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-15 00:36:02 +0000
commit25b66ec5e31edc19a67e1dfb98977148c264f7aa (patch)
tree29ffef1aa85e9e2b18581970d1b566cd7a658885
parentb42ad736116b14726c85af01a2a897f977c0418a (diff)
downloadpfsense-25b66ec5e31edc19a67e1dfb98977148c264f7aa.zip
pfsense-25b66ec5e31edc19a67e1dfb98977148c264f7aa.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