wok rev 1968
openldap: external init script support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 01 13:54:26 2009 +0000 (2009-01-01) |
parents | 69efa92df38e |
children | 613308e1ffbc |
files | openldap/receipt openldap/stuff/etc/init.d/openldap |
line diff
1.1 --- a/openldap/receipt Thu Jan 01 13:44:39 2009 +0000 1.2 +++ b/openldap/receipt Thu Jan 01 13:54:26 2009 +0000 1.3 @@ -27,7 +27,7 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr 1.8 + mkdir -p $fs/usr $fs/etc/ldap.d 1.9 cp -a $_pkg/etc $fs 1.10 cp -a $_pkg/usr/bin $fs/usr 1.11 cp -a $_pkg/usr/sbin $fs/usr
2.1 --- a/openldap/stuff/etc/init.d/openldap Thu Jan 01 13:44:39 2009 +0000 2.2 +++ b/openldap/stuff/etc/init.d/openldap Thu Jan 01 13:54:26 2009 +0000 2.3 @@ -20,9 +20,20 @@ 2.4 echo "$NAME already running." 2.5 exit 1 2.6 fi 2.7 - echo -n "Starting $DESC: $NAME... " 2.8 - $DAEMON $OPTIONS && sleep 2 2.9 - status 2.10 + if [ -f /var/openldap-data/__db.001 ]; then 2.11 + echo -n "Starting $DESC: $NAME... " 2.12 + $DAEMON $OPTIONS && sleep 2 2.13 + status 2.14 + for i in /etc/ldap.d/* ; do 2.15 + [ -x $i ] || continue 2.16 + echo "Running $i..." 2.17 + $i 2.18 + done 2.19 + else 2.20 + echo -n "Starting $DESC: $NAME... " 2.21 + $DAEMON $OPTIONS && sleep 2 2.22 + status 2.23 + fi 2.24 ;; 2.25 stop) 2.26 if [ ! -f $PIDFILE ] ; then