mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
www/OPNProxy: switch to mwexecf() use
This commit is contained in:
parent
9f23ada61d
commit
2e56601903
2 changed files with 6 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
PLUGIN_NAME= OPNProxy
|
||||
PLUGIN_VERSION= 1.0.5
|
||||
PLUGIN_REVISION= 3
|
||||
PLUGIN_REVISION= 4
|
||||
PLUGIN_COMMENT= OPNsense proxy additions
|
||||
PLUGIN_DEPENDS= os-redis${PLUGIN_PKGSUFFIX} \
|
||||
os-squid${PLUGIN_PKGSUFFIX} \
|
||||
|
|
|
|||
|
|
@ -28,22 +28,21 @@
|
|||
|
||||
function opnproxy_configure()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'user_changed' => ['opnproxy_user_changed:2'],
|
||||
'webproxy' => ['opnproxy_webproxy:2'],
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
function opnproxy_user_changed($verbose = false, $username = '')
|
||||
function opnproxy_user_changed($unused, $username = '')
|
||||
{
|
||||
exec("/usr/local/opnsense/scripts/OPNProxy/redis_sync_users.py " . escapeshellarg($username));
|
||||
mwexecf('/usr/local/opnsense/scripts/OPNProxy/redis_sync_users.py %', $username);
|
||||
}
|
||||
|
||||
|
||||
function opnproxy_webproxy($verbose = false, $action = null)
|
||||
{
|
||||
$response = configd_run('template reload Deciso/Proxy');
|
||||
|
||||
if ($verbose) {
|
||||
printf("template reload Deciso/Proxy: %s\n", trim($response));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue