certbot.plugins.util

Plugin utilities.

certbot.plugins.util.path_surgery(cmd)[source]

Attempt to perform PATH surgery to find cmd

Mitigates https://github.com/certbot/certbot/issues/1833

Parameters:cmd (str) – the command that is being searched for in the PATH
Returns:True if the operation succeeded, False otherwise
certbot.plugins.util.already_listening(port, renewer=False)[source]

Check if a process is already listening on the port.

If so, also tell the user via a display notification.

Warning

On some operating systems, this function can only usefully be run as root.

Parameters:port (int) – The TCP port in question.
Returns:True or False.
certbot.plugins.util.already_listening_socket(port, renewer=False)[source]

Simple socket based check to find out if port is already in use

Parameters:port (int) – The TCP port in question.
Returns:True or False
certbot.plugins.util.already_listening_psutil(port, renewer=False)[source]

Psutil variant of the open port check

Parameters:port (int) – The TCP port in question.
Returns:True or False.