- Timestamp:
- 12/03/08 23:07:49 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/linuxmuster-base/trunk/var/config-dynamic/15_ldap/prepatch
r156 r406 1 # start postgresql 2 /etc/init.d/postgresql-8.1 start 1 # recreate pg clusters on first install 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 11 fi 3 12 4 13 … … 105 114 addgroup openldap ssl-cert 106 115 107 # create new database 108 sophomorix-setup-pgldap --new-database 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 109 120 110 # random password for ldap db user121 # new random password for ldap db user 111 122 ldapdbpw=`pwgen -s 8 1` 123 124 # set ldap db password for schulkonsole 112 125 psql -U postgres -d template1 -qc "ALTER USER ldap WITH PASSWORD '"$ldapdbpw"';" 113 sed -e "s/^Password=.*/Password=$ldapdbpw/" -i /etc/linuxmuster/schulkonsole/db.conf 126 sed -e "s|^Password=.*|Password=$ldapdbpw|" -i /etc/linuxmuster/schulkonsole/db.conf 127 128 # deactivate postgres 7.4 129 /etc/init.d/postgresql-7.4 stop 130 update-rc.d -f postgresql-7.4 remove 114 131 115 132 else 116 133 117 134 # update user database with basedn and workgroup if necessary 118 [ "$update_ldap" = "yes" ] && sophomorix-setup-pgldap 135 if [ "$update_ldap" = "yes" ]; then 136 ldapdbpw=`grep ^Password /etc/linuxmuster/schulkonsole/db.conf | awk -F\= '{ print $2 }'` 137 sophomorix-setup-pgldap --slapd-standalone --dbpw "$ldapdbpw" --keep-database 138 fi 119 139 120 140 fi
Note: See TracChangeset
for help on using the changeset viewer.
