aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2007-01-17 13:52:52 +0800
committergrog <grog@FreeBSD.org>2007-01-17 13:52:52 +0800
commit50aa98f277a13809e3dca876665e0634bef466f7 (patch)
treed68d5295cbb66c5c0fa500d6526d1bb847786fb6 /multimedia
parent528ab682668803974835efcb8da0d1d80a082ab7 (diff)
downloadfreebsd-ports-graphics-50aa98f277a13809e3dca876665e0634bef466f7.tar.gz
freebsd-ports-graphics-50aa98f277a13809e3dca876665e0634bef466f7.tar.zst
freebsd-ports-graphics-50aa98f277a13809e3dca876665e0634bef466f7.zip
Perform some post-install stuff: add users and create the mythconverg
database if it doesn't already exist.
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 00000000000..396f172a20b
--- /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