Skip to content

Commit 1b8ff3c

Browse files
Leechaelclaude
andcommitted
fix: prevent duplicate plugin installation to avoid infinite loop
- Check if plugin is already installed before attempting installation - Prevents repeated installation attempts in Docker environments - Reduces startup time and avoids potential infinite loops 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7570a36 commit 1b8ff3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ def install_plugin(self) -> bool:
3030
print(f"No certbot package defined for {self.provider_type}")
3131
return False
3232

33+
# Check if plugin is already installed
34+
try:
35+
if self.provider.CERTBOT_PLUGIN == "dns-namecheap":
36+
import certbot_dns_namecheap.dns_namecheap
37+
print(f"Plugin {self.provider.CERTBOT_PACKAGE} is already installed")
38+
return True
39+
except ImportError:
40+
pass # Plugin not installed, continue with installation
41+
3342
print(f"Installing certbot plugin: {self.provider.CERTBOT_PACKAGE}")
3443

3544
# Use virtual environment pip if available

0 commit comments

Comments
 (0)