Changeset 850 for n4d-ldap


Ignore:
Timestamp:
Mar 14, 2016, 9:48:03 AM (4 years ago)
Author:
hectorgh
Message:

using systemctl calls instead

Location:
n4d-ldap/trunk/fuentes/install/usr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • n4d-ldap/trunk/fuentes/install/usr/sbin/llx-slapd-backup

    r829 r850  
    2929dump)
    3030       
    31         /usr/sbin/slapd-daemon-starter stop
     31        systemctl stop slapd
    3232        slapcat -n 0 > ${BACKUPDIR}/config.ldif
    3333        slapcat -n 1 > ${BACKUPDIR}/data.ldif
     
    3939        rsync -ptgox /etc/default/slapd  ${BACKUPDIR}/install/etc/default/
    4040        rsync -ptgox /etc/lliurex-secrets/passgen/ldap.secret ${BACKUPDIR}/install/etc/lliurex-secrets/passgen/
    41         /usr/sbin/slapd-daemon-starter start
     41        systemctl start slapd
    4242       
    4343        tar -czf $BACKUPFILE -C $BACKUPDIR .
     
    5555        SLAPD_RUN="/run/slapd"
    5656
    57         /usr/sbin/slapd-daemon-starter stop
     57        systemctl stop slapd
    5858        rm -rf ${SLAPD_CONF} || true
    5959        mkdir -p -m 0755 $SLAPD_CONF
     
    7878        rsync -ax ${BACKUPDIR}/install/* /
    7979        chmod 600 /etc/lliurex-secrets/passgen/ldap.secret
    80         /usr/sbin/slapd-daemon-starter start
     80        systemctl start slapd
    8181       
    8282        ;;
  • n4d-ldap/trunk/fuentes/install/usr/sbin/reset-slapd

    r829 r850  
    5555SLAPD_DB_PATH="/var/lib/ldap"
    5656
    57 /usr/sbin/slapd-daemon-starter stop
     57systemctl stop slapd
    5858
    5959#Check if directories has correct permissions
     
    9494capture_diagnostics slapadd -F "${SLAPD_CONF}" -b "cn=config" -l "${initldif}" || die "Have an error when load init configuration on config directory"
    9595chown -R ${SLAPD_USER}:${SLAPD_GROUP} $SLAPD_CONF || die "On /etc/default/slapd aren't SLAPD_USER or SLAPD_GROUP variable"
    96 /usr/sbin/slapd-daemon-starter start
     96systemctl start slapd
  • n4d-ldap/trunk/fuentes/install/usr/share/n4d/python-plugins/SlapdManager.py

    r829 r850  
    482482        def reboot_slapd(self):
    483483               
    484                 proc = subprocess.Popen(['/usr/sbin/slapd-daemon-starter','restart'],stdout=subprocess.PIPE,stdin=subprocess.PIPE).communicate()
     484                proc = subprocess.Popen(['systemctl','restart',"slapd"],stdout=subprocess.PIPE,stdin=subprocess.PIPE).communicate()
    485485               
    486486                return {"status":True,"msg":"Server is reboot"}
     
    767767       
    768768        def restore_backup_config(self, path):
    769                 os.system("/usr/sbin/slapd-daemon-starter stop")
     769                os.system("systemctl stop slapd")
    770770                os.system("rm -fr /etc/ldap/slapd.d/*")
    771771                os.system("slapadd -n 0 -l "+path+" -F /etc/ldap/slapd.d/")
    772772                os.system("chown -R openldap:openldap /etc/ldap/slapd.d/")
    773                 os.system("/usr/sbin/slapd-daemon-starter start")
     773                os.system("systemctl start slapd")
    774774                return {"status":True,"msg":"Config backup restored"}
    775775       
Note: See TracChangeset for help on using the changeset viewer.