works for openldap
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
if not os.path.exists("/etc/sasl2/sasldb2"):
|
||||
os.system("/usr/sbin/saslpasswd2 -f /etc/sasl2/sasldb2 -p login")
|
||||
os.system("/usr/sbin/saslpasswd2 -f /etc/sasl2/sasldb2 -d login")
|
||||
|
||||
os.system("/bin/chown root:mail /etc/sasl2/sasldb2")
|
||||
os.system("/bin/chmod 0640 /etc/sasl2/sasldb2")
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from comar.service import *
|
||||
|
||||
serviceType = "server"
|
||||
serviceDesc = _({"en": "Cyrus-SASL Daemon",
|
||||
"tr": "Cyrus-SASL Servisi"})
|
||||
serviceConf = "saslauthd"
|
||||
|
||||
SOCKETDIR = "/run/saslauthd"
|
||||
PIDFILE = "/run/saslauthd/saslauthd.pid"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command="/usr/sbin/saslauthd",
|
||||
args="-m %s %s" % (SOCKETDIR, config.get("SASLAUTHD_OPTS", "")),
|
||||
pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
def status():
|
||||
return isServiceRunning(PIDFILE)
|
||||
Reference in New Issue
Block a user