Changeset 798 for n4d-ldap


Ignore:
Timestamp:
Mar 7, 2016, 12:58:43 PM (3 years ago)
Author:
hectorgh
Message:

adding service files

Location:
n4d-ldap/trunk/fuentes
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • n4d-ldap/trunk/fuentes/debian/postinst

    r149 r798  
    1818# for details, see http://www.debian.org/doc/debian-policy/ or
    1919# the debian-policy package
     20
     21PACKAGE_NAME="n4d-ldap"
     22ORIGINAL_FILE="/etc/init.d/slapd"
     23DIVERT_FILE="/usr/share/n4d-ldap/diversions/etc.initd.slapd.divert"
     24LLIUREX_FILE="/usr/sbin/slapd-daemon-starter"
    2025
    2126
     
    6368       
    6469
     70        if [ -e "$ORIGINAL_FILE" ]; then
     71
     72                update-rc.d slapd disable 2 3 4 5 || true
     73                dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --add --divert  ${DIVERT_FILE}  ${ORIGINAL_FILE}
     74                ln -fs ${LLIUREX_FILE}  ${DIVERT_FILE}
     75                systemctl daemon-reload || true
     76                systemctl enable slapd || true
     77
     78        fi
     79
     80
     81
     82
     83
    6584        n4d-modules enable-plugin /etc/n4d/conf.d/SlapdManager || true
    6685
  • n4d-ldap/trunk/fuentes/debian/prerm

    r149 r798  
    1717# the debian-policy package
    1818
     19PACKAGE_NAME="n4d-ldap"
     20ORIGINAL_FILE="/etc/init.d/slapd"
     21DIVERT_FILE="/usr/share/n4d-ldap/diversions/etc.initd.slapd.divert"
     22LLIUREX_FILE="/usr/sbin/slapd-daemon-starter"
     23
    1924
    2025case "$1" in
    21     remove|upgrade|deconfigure)
     26    upgrade|deconfigure)
     27    ;;
     28
     29    remove|purge)
     30
     31        if [ -f ${DIVERT_FILE} ] ; then
     32                rm -rf $LLIUREX_FILE || true
     33                dpkg-divert --package  ${PACKAGE_NAME} --rename --quiet --remove ${ORIGINAL_FILE}|| true
     34                systemctl daemon-reload || true
     35                update-rc.d slapd enable 2 3 4 5 || true
     36               
     37        fi
     38
     39
    2240    ;;
    2341
Note: See TracChangeset for help on using the changeset viewer.