mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Moved HTTPInstance class to the base.instances.http module and started rewriting it to not use hardcoded paths and names, but instead use variables defined in the implementations provided by the platform modules.
40 lines
1.5 KiB
Python
40 lines
1.5 KiB
Python
# Authors: Krzysztof Klimonda <kklimonda@ubuntu.com>
|
|
#
|
|
# Copyright (C) 2012 Krzysztof Klimonda
|
|
# see file 'COPYING' for use and warranty information
|
|
#
|
|
# This program 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, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
import os
|
|
|
|
from ipapython import ipautil
|
|
|
|
from ..base.instances import HTTPInstance
|
|
|
|
class DebianHTTPInstance(HTTPInstance):
|
|
def __init__(self):
|
|
self.httpd_dir = "/etc/apache2"
|
|
self.httpd_conf_dir = os.path.join(self.httpd_dir, "conf.d")
|
|
self.nss_conf = os.path.join(self.httpd_dir, "mods-available/nss.conf")
|
|
self.nss_vhost = os.path.join(self.httpd_dir, "sites-available/nss")
|
|
self.ssl_conf = None # not used by Debian for disabling mod_ssl
|
|
self.keytab_path = os.path.join(self.http_dir, "ipa.keytab")
|
|
self.httpd_user = "www-data"
|
|
self.password_conf = 'file:/etc/apache2/password.conf'
|
|
|
|
def _disable_mod_ssl(self):
|
|
ipautil.run(["a2dismod", "ssl"])
|
|
ipautil.run(["a2dissite", "default-ssl"])
|