aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorGreg Lehey <grog@FreeBSD.org>2007-01-17 05:52:52 +0000
committerGreg Lehey <grog@FreeBSD.org>2007-01-17 05:52:52 +0000
commitce57b22c43f1a7174f338b71d57d002fb1097510 (patch)
tree941800b57b6daffa64f6620753ca7bb376acd5eb /multimedia
parent3fe64eed13d97356962f46c57ee79537c17a50df (diff)
Notes
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mythtv/files/makedb23
1 files changed, 23 insertions, 0 deletions
diff --git a/multimedia/mythtv/files/makedb b/multimedia/mythtv/files/makedb
new file mode 100644
index 000000000000..396f172a20b7
--- /dev/null
+++ b/multimedia/mythtv/files/makedb
@@ -0,0 +1,23 @@
+#!/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