#!/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