Commit a928f18a authored by Ad Schellevis's avatar Ad Schellevis

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

parent a03cc14f
......@@ -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