[mythtv-users] MythBackend OS X and Schedules Direct

Craig Treleaven ctreleaven at cogeco.ca
Sun Jul 13 14:11:29 UTC 2008


At 11:18 PM -0400 7/12/08, Bill Carlson wrote:
>This was asked by someone else a few months ago, but couldn't find a response.
>I seem to not be able to use my schedules direct account on the latest
>MythBackend-fixes
>under OS X.

I found I had to specify the entire path to the unix executable within the Mac application bundle, eg:

/Applications/AudioVisualMusic/Myth/MythFillDatabase.app/Contents/MacOS/MythFillDatabase > /usr/local/wctlog/MythFillDatabase.log

Your path will be different.

In fact, I modified a script by sdkovacs to backup the MySQL database before running the backup, below.  MythBackend calls the script...so it runs with the environment and permissions of that user.

#! /bin/bash
#
# Created on 3/22/2006 by sdkovacs
# Modified on 9Oct2007 by Craig Treleaven
#            26Mar2008 by Craig Treleaven -- shouldn't need to refresh-all with .21
#			 19Jun2008 by Craig Treleaven -- hasn't backed up sucessfully since Oct!  Since backend now runs
#											as startupitem, this is being called with no environment variables set.
#											Hence, can't find mysqldump utility (?)
#
# Script: mythbackupthenfill.sh
#
#
#
#
########################################################
BACKFILE="/usr/local/wctlog/mythconvergbackup.`date +%a`.sql.gz"

/usr/local/mysql/bin/mysqldump -u mythtv -pmythtv mythconverg -c | gzip -c > ${BACKFILE}
if [ $? -ne "0" ] ; then
	echo "Mythtv database backup failed! Exiting..."
	exit 1
else
	cp ${BACKFILE} /Volumes/Theatre/MythBackup

	/Applications/AudioVisualMusic/Myth/MythFillDatabase.app/Contents/MacOS/MythFillDatabase > /usr/local/wctlog/MythFillDatabase.log
fi


Craig


More information about the mythtv-users mailing list