use bin/initdb.sh instead of manual db table insert

This commit is contained in:
Matthew Saunders Brown 2024-01-02 16:30:42 -08:00
parent 526b308474
commit cef8bab19d

View File

@ -63,16 +63,8 @@ sed -i "s|.*sauserprefs_db_dsnw.*|\$config['sauserprefs_db_dsnw'] = 'mysql://$db
# create tmp files storage dir
install --owner=www-data --group=www-data --mode=750 --directory /var/tmp/roundcube
# prefix roundcubemail mysql tables with rc_
cp /srv/www/html/roundcube/SQL/mysql.initial.sql $installer_dir/rc.sql
tables=(`grep TABLE rc.sql |cut -d \\\` -f 2`)
for table in "${!tables[@]}"
do
table=${tables[$table]}
sed -i "s|\`$table\`|\`rc_$table\`|g" rc.sql
done
# load roundcube database tables
mysql vmail < rc.sql
/srv/www/html/roundcube/bin/initdb.sh --dir=SQL
# set permissions
rm -r /srv/www/html/roundcube/installer/