Skip to content

Commit 1ef9695

Browse files
committed
fix: namecheap
1 parent 5d50c38 commit 1ef9695

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

custom-domain/dstack-ingress/scripts/certman.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def install_plugin(self) -> bool:
6363
print(f"Plugin {self.provider.CERTBOT_PLUGIN} successfully imported")
6464

6565
# Try to create a simple test to see if the plugin works
66-
test_cmd = ["certbot", "certonly", "--help", "--dns-namecheap"]
66+
test_cmd = ["certbot", "plugins"]
6767
test_result = subprocess.run(test_cmd, capture_output=True, text=True, timeout=10)
68-
if test_result.returncode == 0 or "unrecognized arguments" not in test_result.stderr:
68+
if test_result.returncode == 0 and "dns-namecheap" in test_result.stdout:
6969
print(f"Plugin {self.provider.CERTBOT_PLUGIN} is working correctly")
7070
return True
7171
else:
@@ -101,7 +101,7 @@ def _build_certbot_command(self, action: str, domain: str, email: str) -> List[s
101101
# Add DNS plugin configuration
102102
base_cmd.extend(
103103
[
104-
f"--{plugin}",
104+
"-a", plugin,
105105
f"--{plugin}-propagation-seconds",
106106
str(propagation_seconds),
107107
"--non-interactive",

custom-domain/dstack-ingress/scripts/dns_providers/namecheap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def setup_certbot_credentials(self) -> bool:
4141
cred_file = os.path.join(cred_dir, "namecheap.ini")
4242
with open(cred_file, "w") as f:
4343
f.write(f"# Namecheap API credentials used by Certbot\n")
44-
f.write(f"certbot_dns_namecheap:dns_namecheap_username = {self.username}\n")
45-
f.write(f"certbot_dns_namecheap:dns_namecheap_api_key = {self.api_key}\n")
44+
f.write(f"dns_namecheap_username={self.username}\n")
45+
f.write(f"dns_namecheap_api_key={self.api_key}\n")
4646

4747
os.chmod(cred_file, 0o600)
4848
return True

0 commit comments

Comments
 (0)