ce57b22c43
database if it doesn't already exist.
23 lines
690 B
Bash
23 lines
690 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# Install the MythTV database. We only do this if it doesn't already
|
|
# exist.
|
|
#
|
|
# Start mysqld if it isn't running.
|
|
pgrep mysqld > /dev/null || /usr/local/etc/rc.d/mysql start || exit
|
|
# Try to create the database
|
|
mysql < /usr/local/share/mythtv/database/mc.sql
|
|
if [ $? -ne 0 ]; then
|
|
echo <<EOF
|
|
*********************************************************************
|
|
Database creation failed. Please read the output above and create it
|
|
manually. The commands to create the database are in
|
|
/usr/local/share/mythtv/database/mc.sql.
|
|
*********************************************************************
|
|
EOF
|
|
else
|
|
echo <<EOF
|
|
Created database mythconverg.
|
|
EOF
|