Post by Doug LaidlawIt can't find a backend.
Looking through my mythtv install script:
$ ui mythtv _urpmi
x_urpmi transcode ! needed by mythtv-frontend
x_urpmi mythtv-frontend ! Client component of mythtv a PVR
x_urpmi perl-MythTV ! needed by mythtv-doc
x_urpmi mythtv-doc ! MythTV documentation
x_urpmi mythtv-backend ! server providing recordings/files to myth-frontend,
x_urpmi mythtv-setup ! App to configure MYTHTV server
I have separate package installs since I run both client and servers
on different boxes.
Note: some of the packages pull in others that I have listed.
That allows me to know that I loaded them.
Post by Doug LaidlawI am a bit confused as to which end is which.
mythtv-setup is used to configure the backend. Configurations and
whatnot stored in the mysql database. Recordings and whatnot stored
wherever you configure them.
You run the frontend on any system to pull whatever from the backend.
backend is what is doing the recording, "controls access to the tv input"
and feeds content to the frontend.
Once you have configured everything, saved the database it is pretty
easy there after. First thing will be setting your mysql admin/root
password with mysqladmin, load timezone data, then the mythtv database.
To configure the channel database I wrote my own script to create the
sql commands to set channel attributes. Here is your first basic steps
as root
install your packages
create your video storage partition and set owner/group mythtv
create mythtv home directory and put links to video storage dir.
Suggest creating a mythtv_changes script.
$ cat /local/bin/mythtv_changes
#! /bin/bash
#************** Start mythtv_changes ****************************************
#*
#* mythtv_changes - mythtv changes
#*
#*
#******************************************************************************
. /local/bin/function_path_app
_app=mythtv
_node=$_node
_in_fn=""
_out_fn=""
_fn=""
_lnk=""
_tuner=""
_install_db=0
array=(
"3rdParty"
"banners"
"bkup"
"channels"
"coverart"
"fanart"
"livetv"
"screenshots"
"themes"
"tmp"
"trailers"
"videos"
)
#***************************************************
#* mythtv application for tv tuner video recording
#***************************************************
case $_node in
tb) _install_db=1
_tuner=homerun4
;;
mtv) _install_db=1
_tuner=homerun1
;;
*) _install_db=0 ;;
esac
if [ $_install_db -eq 1 ] ; then
#*********************************************
#* create links to some mythtv applications
#*********************************************
ln -fs /usr/share/mythtv/mythconverg_backup.pl /usr/local/bin/
ln -fs /usr/share/mythtv/mythconverg_restore.pl /usr/local/bin/
#**************************************
#* create video and storage directories
#**************************************
_storage_dir=/video
mkdir -p $_storage_dir
chown mythtv:mythtv $_storage_dir
chmod g+rwx $_storage_dir
chmod g+s $_storage_dir
for _dir in ${array[*]} ; do
mkdir -p $_storage_dir/$_dir
done
chmod g+rwx $_storage_dir/*
cd $_storage_dir
chown -R mythtv:mythtv *
chown root:root lost+found
chmod 700 lost+found
cd
mkdir -p /var/log/mythtv
chown mythtv:mythtv /var/log/mythtv
#**********************************************
#* depending on your distribution, you might have
#* to create a Linux mythtv user directory
#* and create config and storage directory links
#**********************************************
mkdir -p /var/lib/mythtv
chown -R mythtv:mythtv /var/lib/mythtv
cd /var/lib/mythtv
for _dir in ${array[*]} ; do
if [ ! -e $_dir ] ; then
ln -s $_storage_dir/$_dir
fi
done
#***************************************************
#* change systemd startup file to use new config dir
#***************************************************
_in_fn="/lib/systemd/system/mythbackend.service"
_out_fn=/etc/systemd/system/mythbackend.service
if [ ! -e $_out_fn ] ; then
echo "Installing $_out_fn"
echo "# Created by $_exe $(date '+%a %d %b %H:%M %Y')
" > $_out_fn
while read -r line; do
set -- $(IFS='='; echo $line)
if [ $# -ne 0 ] ; then
_wd=$1
case $_wd in
Environment)
echo "Environment=MYTHCONFDIR=/var/lib/mythtv" >> $_out_fn
line="ExecStartPre=$_exe"
;;
After) line="$line dhcpd.service" ;;
*) ;;
esac
fi
echo "$line" >> $_out_fn
done < $_in_fn
fi
fi # end if [ $_install_db -eq 1 ]
echo "
completed $_exe
"
exit 0
#************** End mythtv_changes *********************
$ cat function_path_app
#*********************** start of function_path_app *************************
_cmd_line_args="$*"
#*****************************************
# Possible cron job.
# If / or null set home to /local
#*****************************************
if [ -z "$HOME" ] ; then
export HOME=/local
fi
if [ "$HOME" = "/" ] ; then
export HOME=/local
fi
#*****************************************
# set full path list for $PATH 64 bit
#*****************************************
export PATH="\
/usr/local/sbin:/usr/local/bin:/usr/sbin\
:/usr/bin:/sbin:/bin:/local/bin:/usr/libexec\
:/usr/games:/usr/lib64/qt4/bin:/usr/lib/qt4/bin\
:$HOME/local/bin\
"
#*********************************************************
# set executing app name and if a link, get real name
#*********************************************************
_exe=$(which $0)
_app=$(basename $_exe)
_real_exe=$(stat --format=%N $_exe | tr -d '\200\230\231\342')
if [ ${#_real_exe} -gt 0 ] ; then
_i=$(expr index "$_real_exe" '>')
_real_exe=${_real_exe:${_i}+1}
fi
export _real_exe
tty -s
export _cron_flg=$? # $?=0 interactive =1 cron
if [ -t 1 ] ; then # redirection is not being used.
export _redirect_flg=0
else # redirection is being used.
export _redirect_flg=1
fi
_node=$(hostname --alias)
if [ "$HOME" = "/tmp" ] ; then
export HOME=/local
fi
#*************************************************
# clears screen unless running in cron/redirected
#*************************************************
function tput_clear
{
_flg=$(( $_redirect_flg + $_cron_flg ))
if [ $_flg -eq 0 ] ; then
tput clear
fi
} # end function tput_clear
#****************************************
# outputs message unless running in cron.
#****************************************
function progress
{
if [ $_cron_flg -eq 0 ] ; then
echo "$1"
fi
} # end function progress
#*****************************************
# reduce journalctl complaints when doing
# a sudo su - some_loginid
#*****************************************
if [ -z ${XDG_RUNTIME_DIR:-""} ] ; then
export XDG_RUNTIME_DIR=/run/user/$(id --group)
fi
for _d in dconf dbus pulse gvfs ; do
mkdir -p $XDG_RUNTIME_DIR/$_d 2> /dev/null
chmod 700 $XDG_RUNTIME_DIR/$_d 2> /dev/null
done
chmod 700 $XDG_RUNTIME_DIR 2> /dev/null
#********************************
# probably running in cron/batch.
# Let's allow xmessage pop ups
#********************************
if [ -z ${DISPLAY:-""} ] ; then
export DISPLAY=:0.0
fi
#*********************** end of function_path_app ****************************
as root
systemctl enable mythbackend
systemctl stop mythbackend
/usr/bin/mysqladmin --user=root password 'mysql_pw_here'
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root --password=mysql_pw_here
mysql --user=root --password=kitty50 mysql < /usr/share/mythtv/initialdb/mc.sql
mysql_secure_installation #enter mysql_pw_here and remove testdb and set whatever you like
as user,
mythtv-setup &
change hostname 127.0.0.1
click Upgrade
Go through and configure storage and devices
select channel editor
click Delete all
click Scan channels
ESC
mysql --user=root --password=mysql_pw_here mythconverg
grant all on mythconverg.* to mythtv@"192.168.0.%" identified by "mythtv";
flush privileges;
quit
As root:
systemctl enable mythbackend
systemctl start mythbackend
systemctl status mythbackend
mythfilldatabase --dd-grab-all