summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/MythVantage-system/initial_db_run
diff options
context:
space:
mode:
Diffstat (limited to 'abs/mv-core/MythVantage-system/initial_db_run')
-rw-r--r--abs/mv-core/MythVantage-system/initial_db_run24
1 files changed, 24 insertions, 0 deletions
diff --git a/abs/mv-core/MythVantage-system/initial_db_run b/abs/mv-core/MythVantage-system/initial_db_run
new file mode 100644
index 0000000..0824c60
--- /dev/null
+++ b/abs/mv-core/MythVantage-system/initial_db_run
@@ -0,0 +1,24 @@
+#!/bin/bash
+. /etc/profile
+. /etc/systemconfig
+rundb=1
+
+if [ -f /var/log/mfdb.first.log ]
+then
+ #check exit code
+ rundb=`tail -1 /var/log/mfdb.first.log`
+fi
+
+if [ ! $rundb = 0 ]
+then
+ echo "Running 1st mythfilldatabase"
+ echo "Do not remove this file. This file is used to determine if mythfilldatabase needs to run before starting mythbackend" > /var/log/mfdb.first.log
+
+
+ /usr/local/bin/mythfilldatabase 2>&1 >> /var/log/mfdb.first.log
+
+ echo $? >> /var/log/mfdb.first.log
+fi
+
+
+