diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/nat.py | 1 | ||||
-rwxr-xr-x | src/conf_mode/pki.py | 4 | ||||
-rwxr-xr-x | src/helpers/teardown-config-session.py | 3 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py index a938021ba..564438237 100755 --- a/src/conf_mode/nat.py +++ b/src/conf_mode/nat.py @@ -23,7 +23,6 @@ from vyos.base import Warning from vyos.config import Config from vyos.configdep import set_dependents, call_dependents from vyos.template import render -from vyos.template import is_ip_network from vyos.utils.kernel import check_kmod from vyos.utils.dict import dict_search from vyos.utils.dict import dict_search_args diff --git a/src/conf_mode/pki.py b/src/conf_mode/pki.py index 7d01b6642..6522a3897 100755 --- a/src/conf_mode/pki.py +++ b/src/conf_mode/pki.py @@ -144,7 +144,7 @@ def certbot_request(name: str, config: dict, dry_run: bool=True): # When ACME is used behind a reverse proxy, we always bind to localhost # whatever the CLI listen-address is configured for. - if ('haproxy' in dict_search('used_by', config) and + if ('used_by' in config and 'haproxy' in config['used_by'] and is_systemd_service_running(systemd_services['haproxy']) and not check_port_availability(listen_address, 80)): tmp += f' --http-01-address 127.0.0.1 --http-01-port {internal_ports["certbot_haproxy"]}' @@ -551,7 +551,7 @@ def generate(pki): if not ca_cert_present: tmp = dict_search_args(pki, 'ca', f'{autochain_prefix}{cert}', 'certificate') if not bool(tmp) or tmp != cert_chain_base64: - Message(f'Add/replace automatically imported CA certificate for "{cert}"...') + Message(f'Add/replace automatically imported CA certificate for "{cert}" ...') add_cli_node(['pki', 'ca', f'{autochain_prefix}{cert}', 'certificate'], value=cert_chain_base64) return None diff --git a/src/helpers/teardown-config-session.py b/src/helpers/teardown-config-session.py index c94876924..8d13e34cb 100755 --- a/src/helpers/teardown-config-session.py +++ b/src/helpers/teardown-config-session.py @@ -13,11 +13,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import sys -import os from vyos.vyconf_session import VyconfSession |