net/ftp-proxy: tweak usage / presentation a bit

This commit is contained in:
Franco Fichtner
2016-11-07 23:01:36 +01:00
parent e73df13288
commit a013466257
3 changed files with 26 additions and 3 deletions
@@ -1,4 +1,5 @@
<?php
/*
Copyright (C) 2016 EURO-LOG AG
All rights reserved.
@@ -28,9 +29,31 @@
function ftpproxy_firewall($fw)
{
global $config;
if (isset($config['OPNsense']['ftpproxies']) && is_array($config['OPNsense']['ftpproxies'])) {
$fw->registerAnchor("ftp-proxy/*", "nat");
$fw->registerAnchor("ftp-proxy/*", "rdr");
$fw->registerAnchor("ftp-proxy/*", "fw");
}
}
function ftpproxy_services()
{
global $config;
$services = array();
if (isset($config['OPNsense']['ftpproxies']) && is_array($config['OPNsense']['ftpproxies'])) {
$services[] = array(
'description' => gettext('FTP Proxy Server'),
'configd' => array(
'restart' => array('ftpproxy restart'),
'start' => array('ftpproxy start'),
'stop' => array('ftpproxy stop'),
),
'name' => 'ftp-proxy',
);
}
return $services;
}
@@ -1,7 +1,7 @@
<acl>
<page-services-ftpproxy>
<name>WebCfg - Services: Ftp Proxy page</name>
<description>Allow access to the 'Services: Ftp Proxy' page.</description>
<name>WebCfg - Services: FTP Proxy page</name>
<description>Allow access to the 'Services: FTP Proxy' page.</description>
<patterns>
<pattern>ui/ftpproxy/*</pattern>
<pattern>api/ftpproxy/*</pattern>
@@ -1,5 +1,5 @@
<menu>
<Services>
<FtpProxy VisibleName="Ftp Proxy Server" cssClass="fa fa-bolt fa-fw" order="11" url="/ui/ftpproxy/"/>
<FtpProxy VisibleName="FTP Proxy" cssClass="fa fa-bolt fa-fw" url="/ui/ftpproxy/"/>
</Services>
</menu>