[mythtv-users] mythbackend won't start during bootup on fc16
R. G. Newbury
newbury at mandamus.org
Fri May 18 16:43:31 UTC 2012
On 05/18/2012 11:21 AM, Richard Shaw wrote:
> On Tue, May 8, 2012 at 10:31 PM, R. G. Newbury<newbury at mandamus.org> wrote:
>> ################################################
>> # /usr/local/bin/pre-start.sh
>> #!/bin/bash
>>
>> # Sanity check on existence of required user
>> # Needed after bare-metal install and worth checking otherwise
>> # DEFAULT user and password: fix mysql if changed!
>> # should match config.xml (and mysql.txt)
>>
>> USERNAME="mythtv"
>> PASSWORD="mythtv"
>>
>> # Non-usual home for mythtv user
>> export HOME=/var/log/mythtv
>> export MYTHTV_HOME=/var/log/mythtv
>>
>> # UTF encoding needed by myth
>> export LC_ALL=en_US.UTF-8
>>
>> # Check for user, create if missing, create HOME too
>> RESULT=""
>> # if user exists, will be in /etc/passwd file
>> RESULT=`grep "$USERNAME" /etc/passwd`;
>> if [ "$RESULT" == "" ]; then
>> # echo "Mythtv user not found, user account will be created"
>> useradd -m -d "$HOME" -G mysql -p "$PASSWORD" -U "$USERNAME" 2&>1;
>> else
>> echo "" # acts as a NOP for the else branch
>> # echo "Mythtv user found, no action taken" # testing only
>> fi
>
> I would also add the user to the audio and video groups. This can be
> necessary to access sound and video devices when running as a user
> other than root. Since this should be checked even if the user does
> exist and it's pretty safe, I would just run this evey time (outside
> of the conditional):
>
> usermod -a -G audio,video mythtv
>
> Richard
And I now recall that I did in fact do that when I did the bare-metal
install, That should be added to the pre-start.sh script. It will be to
mine.
Geoff
More information about the mythtv-users
mailing list