Add plugins_reconfigure to squid (#1627)

This commit is contained in:
Alexander Shursha 2017-09-19 21:48:59 +03:00 committed by Franco Fichtner
parent c7c1c55c8e
commit 4cd04003b2
3 changed files with 20 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class ServiceController extends ApiControllerBase
{
if ($this->request->isPost()) {
$backend = new Backend();
$backend->configdRun('proxy plugins start');
$response = $backend->configdRun("proxy start", true);
return array("response" => $response);
} else {
@ -61,6 +62,7 @@ class ServiceController extends ApiControllerBase
{
if ($this->request->isPost()) {
$backend = new Backend();
$backend->configdRun('proxy plugins stop');
$response = $backend->configdRun("proxy stop");
return array("response" => $response);
} else {
@ -76,6 +78,7 @@ class ServiceController extends ApiControllerBase
{
if ($this->request->isPost()) {
$backend = new Backend();
$backend->configdRun('proxy plugins restart');
$response = $backend->configdRun("proxy restart");
return array("response" => $response);
} else {
@ -146,6 +149,7 @@ class ServiceController extends ApiControllerBase
// generate template
$backend->configdRun('template reload OPNsense/Proxy');
$backend->configdRun('proxy plugins reconfigure');
// (res)start daemon
if ($mdlProxy->general->enabled->__toString() == 1) {

View File

@ -0,0 +1,9 @@
#!/usr/local/bin/php
<?php
require_once("config.inc");
require_once("plugins.inc");
if (isset($argv[1])) {
plugins_configure("webproxy_" . trim($argv[1], " \n"));
}

View File

@ -41,3 +41,10 @@ parameters:
type:script
message:download proxy ACLs from remote locations
description:Download external proxy ACLs
[plugins]
command:/usr/local/opnsense/scripts/OPNsense/Proxy/plugins.php
parameters:%s
type:script
message:run plugins for squid
description:Run plugins for squid