works for openldap

This commit is contained in:
Ertuğrul Erata
2015-07-03 16:32:16 +03:00
parent cac083e613
commit 087fcd1c3e
58 changed files with 3236 additions and 5 deletions
+11
View File
@@ -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")
+26
View File
@@ -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)