mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Specify location of netstat binary as a constant
This commit is contained in:
@@ -66,3 +66,7 @@ IConfig.work_dir. Used for easy revocation."""
|
||||
REC_TOKEN_DIR = "recovery_tokens"
|
||||
"""Directory where all recovery tokens are saved (relative to
|
||||
IConfig.work_dir)."""
|
||||
|
||||
NETSTAT = "/bin/netstat"
|
||||
"""Location of netstat binary for checking whether a listener is already
|
||||
running on the specified port (Linux-specific)."""
|
||||
|
||||
@@ -275,7 +275,7 @@ class StandaloneAuthenticator(object):
|
||||
|
||||
try:
|
||||
proc = subprocess.Popen(
|
||||
["/bin/netstat", "-nta", "--program"],
|
||||
[constants.NETSTAT, "-nta", "--program"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, _ = proc.communicate()
|
||||
if proc.wait() != 0:
|
||||
|
||||
Reference in New Issue
Block a user