LinHES Forums http://forum.linhes.org/ |
|
How to run mythfilldatabase automatically at startup http://forum.linhes.org/viewtopic.php?f=11&t=10532 |
Page 1 of 1 |
Author: | spud101 [ Sun Jun 18, 2006 3:48 pm ] |
Post subject: | How to run mythfilldatabase automatically at startup |
Hi, I've got my MythTV box running, thx a lot to this forum and the knoppmyth wiki. I'll post a report in one of the tier sections soon. I still have a question though. I'm not planning to run the box 24/7 so a daily cron job or mythtv setting to run mythfilldatabase daily will not do. I would like to have mythfilldatabase to run every time I turn on the machine. My Linux knowledge is too limited to know how to do this. Since I suppose I need some control over the order what is run when at boottime. The MySQL db should of course have been started already, but I have no idea how to tell linux to run mythfilldatabase after mysql started (and maybe some other stuff) and before the backend (?) and frontend. Thx for any help!! |
Author: | tjc [ Sun Jun 18, 2006 5:10 pm ] |
Post subject: | |
You can probably just put the appropriate command in /etc/init.d/bootmisc.sh I think that is run after the DB is started. BTW - Since bootmisc.sh is run as root and mythfilldatabase should be run as the mythtv user you'll need to prefix the command with "su - mythtv". |
Author: | spud101 [ Sun Jun 18, 2006 5:31 pm ] |
Post subject: | |
thx for the quick reply, I'll try that! |
Author: | turpie [ Sun Jun 18, 2006 5:49 pm ] |
Post subject: | |
On my system putting the command at the end of bootmisc.sh didn't work, I assume because it was too early. What I did instead was create a script in /mythtv/mybootstuff.sh with the following commands. Code: sleep 60 su mythtv -c "mythfilldatabase --quiet" At the end of bootmisc I put the command: Code: /mythtv/mybootstuff.sh& (the "&" sends the process into the background so that it wont hold anything else up.)
Now it works fine and gets fresh data whenever it starts up. |
Author: | spud101 [ Wed Jun 21, 2006 7:26 am ] |
Post subject: | |
works great!! thx a lot!!! |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |