- Timestamp:
- 12/07/08 13:51:14 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/linuxmuster-base/trunk/var/config-dynamic/15_ldap/prepatch
r406 r409 1 # recreate pg clusters on first install1 # necessary to trick sophomorix 2 2 if [ "$1" = "--first" ]; then 3 for i in 7.4 8.1; do 4 pg_dropcluster $i main 5 pg_createcluster $i main 6 cp -f $STATICTPLDIR/etc/postgresql/$i/main/* /etc/postgresql/$i/main 7 /etc/init.d/postgresql-$i start 8 done 9 else 10 /etc/init.d/postgresql-8.1 start 3 pg_dropcluster 7.4 main &> /dev/null 4 pg_dropcluster 8.1 main &> /dev/null 5 pg_createcluster 8.1 main 6 cp $STATICTPLDIR/etc/postgresql/8.1/main/* /etc/postgresql/8.1/main 11 7 fi 8 /etc/init.d/postgresql-8.1 start 12 9 13 10 … … 23 20 fi 24 21 smbpasswd -w $ldapadminpw 25 26 27 # adding tls support to slapd.conf28 slapdtpl=/usr/share/sophomorix/config-templates/ldap/slapd-standalone.conf.template29 if ! grep -q ^TLS $slapdtpl; then30 cp $slapdtpl $slapdtpl.dpkg-old31 cp $STATICTPLDIR$slapdtpl $slapdtpl32 fi33 22 34 23 … … 60 49 s/@@message3@@/${message3}/ 61 50 s/@@basedn@@/${basedn}/g 51 s/@@tls_comment@@//g 62 52 s/@@ldappassword@@/${ldapadminpw}/" $template > /etc/ldap/slapd.conf 63 53 … … 114 104 addgroup openldap ssl-cert 115 105 116 # create new ldap database 117 new_soph_version=`dpkg -l sophomorix-pgldap | grep 'sophomorix-pg' | { read status name version desc; echo "$version";}` 118 old_soph_version="0.0.0-0" 119 sophomorix-setup-pgldap --oldversion "$old_soph_version" --newversion "$new_soph_version" --new-database 106 # create a new ldap database with tricky sophomorix 107 sophomorix-setup-pgldap --oldversion=0.0.0-0 --newversion=0.0.0-0 --new-database 120 108 121 109 # new random password for ldap db user … … 126 114 sed -e "s|^Password=.*|Password=$ldapdbpw|" -i /etc/linuxmuster/schulkonsole/db.conf 127 115 128 # deactivate postgres 7.4129 /etc/init.d/postgresql-7.4 stop130 update-rc.d -f postgresql-7.4 remove131 132 116 else 133 117 … … 135 119 if [ "$update_ldap" = "yes" ]; then 136 120 ldapdbpw=`grep ^Password /etc/linuxmuster/schulkonsole/db.conf | awk -F\= '{ print $2 }'` 137 sophomorix-setup-pgldap -- slapd-standalone--dbpw "$ldapdbpw" --keep-database121 sophomorix-setup-pgldap --oldversion=0.0.0-0 --newversion=0.0.0-0 --dbpw "$ldapdbpw" --keep-database 138 122 fi 139 123
Note: See TracChangeset
for help on using the changeset viewer.
