Commit 24c2e93f authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(proxy) add "download only" action for acl's

(cherry picked from commit a928f18a)
parent d1701ff7
......@@ -151,7 +151,7 @@ class ServiceController extends ApiControllerBase
/**
* fetch acls
* fetch acls (download + install)
* @return array
*/
public function fetchaclsAction()
......@@ -168,4 +168,23 @@ class ServiceController extends ApiControllerBase
return array("response" => array());
}
}
/**
* download (only) acls
* @return array
*/
public function downloadaclsAction()
{
if ($this->request->isPost()) {
$backend = new Backend();
// generate template
$backend->configdRun("template reload OPNsense.Proxy");
// download files
$response = $backend->configdRun("proxy downloadacls");
return array("response" => $response,"status" => "ok");
} else {
return array("response" => array());
}
}
}
......@@ -34,3 +34,10 @@ parameters:
type:script
message:Fetch ACLs from remote locations
description:Fetch external Proxy (squid) ACLs
[downloadacls]
command:/usr/local/opnsense/scripts/proxy/fetchACLs.py
parameters:
type:script
message:Download ACLs from remote locations
description:Download external Proxy (squid) ACLs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment