mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
Add plugins_reconfigure to squid (#1627)
This commit is contained in:
parent
c7c1c55c8e
commit
4cd04003b2
@ -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) {
|
||||
|
||||
9
src/opnsense/scripts/OPNsense/Proxy/plugins.php
Executable file
9
src/opnsense/scripts/OPNsense/Proxy/plugins.php
Executable 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"));
|
||||
}
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user