#!/bin/sh
##
##  wordpress-setup
##

#   determine MySQL root password
password=`grep "^password" @l_prefix@/etc/mysql/my.pwd |\
          sed -e 's;^password[^=]*= *;;' -e 's; *$;;'`

#   create the MySQL database for Wordpress
@l_prefix@/bin/mysqladmin --user=root --password=$password create wordpress
@l_prefix@/bin/mysql --user=root --password=$password mysql <<EOF
GRANT ALL ON wordpress.* TO wordpress@localhost IDENTIFIED BY 'wordpress';
FLUSH PRIVILEGES;
EOF

