|
|
|
@ -16,16 +16,23 @@
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
from calculate.lib.datavars import ReadonlyVariable, Variable
|
|
|
|
|
from calculate.lib.datavars import ReadonlyVariable, Variable, VariableError
|
|
|
|
|
|
|
|
|
|
_ = lambda x: x
|
|
|
|
|
setLocalTranslate('cl_server3', sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClServerName(ReadonlyVariable):
|
|
|
|
|
class VariableClServerName(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Название настраиваемого сервиса
|
|
|
|
|
"""
|
|
|
|
|
value = ""
|
|
|
|
|
untrusted = True
|
|
|
|
|
|
|
|
|
|
def check(self, value):
|
|
|
|
|
if value == 'unix' and self.Get('sr_ldap_set') != 'on':
|
|
|
|
|
raise VariableError(_("LDAP server is not setup."))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClServerEnvPath(Variable):
|
|
|
|
|
"""
|
|
|
|
@ -33,11 +40,17 @@ class VariableClServerEnvPath(Variable):
|
|
|
|
|
"""
|
|
|
|
|
value = "/etc/calculate/server.env"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableSrLdapSet(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Настроен ли LDAP
|
|
|
|
|
"""
|
|
|
|
|
type = "bool"
|
|
|
|
|
value = "off"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("LDAP server configured")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableSrUnixSet(Variable):
|
|
|
|
|
"""
|
|
|
|
@ -45,8 +58,18 @@ class VariableSrUnixSet(Variable):
|
|
|
|
|
"""
|
|
|
|
|
type = "bool"
|
|
|
|
|
|
|
|
|
|
value = "off"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("Unix server configured")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableSrSambaSet(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Настроена ли Samba
|
|
|
|
|
"""
|
|
|
|
|
type = "bool"
|
|
|
|
|
value = "off"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("Samba server configured")
|
|
|
|
|