Add example plugin from certbot source, and notes for running with certbot docker container
This commit is contained in:
commit
0e2e4c9be7
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.swp
|
||||
*.swo
|
||||
*.egg-info
|
||||
|
31
certbot-example-plugins/certbot_example_plugins.py
Normal file
31
certbot-example-plugins/certbot_example_plugins.py
Normal file
@ -0,0 +1,31 @@
|
||||
"""Example Certbot plugins.
|
||||
|
||||
For full examples, see `certbot.plugins`.
|
||||
|
||||
"""
|
||||
import zope.interface
|
||||
|
||||
from certbot import interfaces
|
||||
from certbot.plugins import common
|
||||
|
||||
|
||||
@zope.interface.implementer(interfaces.IAuthenticator)
|
||||
@zope.interface.provider(interfaces.IPluginFactory)
|
||||
class Authenticator(common.Plugin):
|
||||
"""Example Authenticator."""
|
||||
|
||||
description = "Example Authenticator plugin"
|
||||
|
||||
# Implement all methods from IAuthenticator, remembering to add
|
||||
# "self" as first argument, e.g. def prepare(self)...
|
||||
|
||||
|
||||
@zope.interface.implementer(interfaces.IInstaller)
|
||||
@zope.interface.provider(interfaces.IPluginFactory)
|
||||
class Installer(common.Plugin):
|
||||
"""Example Installer."""
|
||||
|
||||
description = "Example Installer plugin"
|
||||
|
||||
# Implement all methods from IInstaller, remembering to add
|
||||
# "self" as first argument, e.g. def get_all_names(self)...
|
17
certbot-example-plugins/setup.py
Normal file
17
certbot-example-plugins/setup.py
Normal file
@ -0,0 +1,17 @@
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
setup(
|
||||
name='certbot-example-plugins',
|
||||
package='certbot_example_plugins.py',
|
||||
install_requires=[
|
||||
'certbot',
|
||||
'zope.interface',
|
||||
],
|
||||
entry_points={
|
||||
'certbot.plugins': [
|
||||
'example_authenticator = certbot_example_plugins:Authenticator',
|
||||
'example_installer = certbot_example_plugins:Installer',
|
||||
],
|
||||
},
|
||||
)
|
Loading…
Reference in New Issue
Block a user