12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # This file is part of acme-updater, written by Helmut Pozimski 2016-2017.
- #
- # stov is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, version 2 of the License.
- #
- # stov is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with stov. If not, see <http://www.gnu.org/licenses/>.
- # -*- coding: utf8 -*-
- """ Contains the postfix module which manages certificates for the ejabberd
- server.
- """
- from amulib import service
- def run(config=None, acme_dir="/var/lib/acme",
- named_key_path="/run/named/session.key"):
- """ manages the certificates for dovecot
- :param config: configuration for the service
- :type config: dict
- :param acme_dir: path to the acme state dir
- :type acme_dir: str
- :param named_key_path: path to the named session.key
- :type named_key_path: str
- """
- if not config:
- config = {
- "certificate_path": "/etc/ejabberd/ejabberd.pem",
- "key_path": "/etc/ejabberd/ejabberd.pem",
- "tlsa": True,
- "tlsa_ports": [5222, 5269]
- }
- service.run("ejabberd", config, acme_dir, named_key_path)
|