|Version 39 (modified by max, 6 years ago)|
To install Shepherd:
- Download Shepherd:
- Run it:
- If Shepherd won't run because a "mandatory module" is not found, install it (see "Perl Dependencies") and try again. You may have to install several mandatory Perl modules before Shepherd can run.
When Shepherd runs for the first time, it will attempt to download and install components (probably into ~/.shepherd/). Most likely, one or more components will fail to install due to missing Perl modules, but ignore this for now.
- Answer the configuration questions to select your region, desired channels, etc. Make sure your channel XMLTV IDs match those expected by your PVR: for example, if you're a MythTV user and in the mythtv-setup Channel Editor you have "ABC Melbourne" set to an XMLTV ID of "abc.free.au", that's what it needs to be in Shepherd, too.
When asked if you want to create the configuration file, say yes.
- [optional] Shepherd will now test all its components. If any require configuration (e.g. the oztivo grabber), you will be prompted to do this. You do not have to configure components, and you can do it later: just press enter to skip any questions asked of you.
- [optional] Shepherd will ask if you want to grab data now. You probably don't, because you haven't installed the optional Perl modules, so say no. Shepherd will exit.
- [optional] For maximum functionality, install any missing Perl modules required by components. See the detailed instructions and why this is worth doing. Essentially, you want to install any missing Perl modules Shepherd complains about when you do this:
- [optional] If you want mythfilldatabase to be able to call Shepherd automatically, symlink it to /usr/bin/tv_grab_au:
sudo ln -s ~/.shepherd/shepherd /usr/bin/tv_grab_au
- [optional] You may delete the original Shepherd file you downloaded (leaving the newly installed version in ~/.shepherd/).
- [optional] If you'd like Shepherd to provide you with some channel icons, set these up:
- [optional] Install Tor if you wish to increase the speed of some grabbers. (Note: most grabbers don't use Tor, so for most users at this time the benefit is marginal.)
Integration with MythTV
Shepherd's job is to create a file of TV guide data for the next 7 days: by default, ~/.shepherd/output.xmltv. (It also creates a log file at ~/.shepherd/logs/shepherd.log.)
Most users want this guide data to end up inside MythTV. This task is handled by MythTV's mythfilldatabase program. You have two ways of managing it:
- Specify in mythtv-setup that you want to use tv_grab_au for guide data. (This requires that you have set up the tv_grab_au symlink as described above.) You can also specify here when and how often you want mythfilldatabase to run.
- Create a cron job to run Shepherd, and feed the output to mythfilldatabase manually with the --file option.
Note that Shepherd should be installed as whichever user is going to run it. If you run mythfilldatabase as root (which is not a good idea) and use option 1 above, then in order for Shepherd to find its config files you need to install it as root, too (despite this also being not a good idea).
Some Useful Commands
A full list of command-line options:
The status screen:
Re-configure Shepherd (preserving old settings except where overridden):
Check whether any components are missing Perl modules or need to be configured:
Shepherd and its components rely on various third-party Perl modules. Some are mandatory, meaning that Shepherd won't run without them. Most, however, are optional, meaning that Shepherd can still operate without them, but some of its components (including grabbers) won't.
You should install all the optional modules if possible, as this increases Shepherd's efficiency, reliability, and possibly the quality of the guide data it delivers. For more information, see the FAQ.
To see which Perl modules you're missing, do this:
The following command should install the necessary packages:
Fedora Core 6 (FC6)
Providing you have your yum/smart system setup for ATrpms.net (see http://www.atrpms.net/install.html), all of the required modules can be installed with:
Some (but not all) of the mandatory modules can be installed with:
sudo emerge -av xmltv Algorithm-Diff Digest-SHA1
Alternately, you can use the non-distribution specific method.
The general method to install Perl modules is to do this (as root):
This will install the mandatory Perl modules:
cpan XMLTV::Ask Algorithm::Diff Compress::Zlib Cwd Data::Dumper Date::Manip Getopt::Long \ List::Compare LWP::UserAgent POSIX Digest::SHA1
And this will install the optional ones:
(Note: this list may not be up to date. If Shepherd complains about more missing modules, install those with cpan <module> as described above.)
It's safe to run these commands even if you have some modules installed; it will leave any previously-installed modules alone, so long as they're the most recent versions.
XMLTV can also be downloaded from http://files.xmltv.org/.
If you are unsure about whether you have XMLTV installed, run the command perldoc XMLTV and see if there is any documentation on your system. If there is, then it is already installed.
XMLTV version 0.5.44 or later is recommended as it supports HDTV flags.
# rpm -q js js-devel js-1.5-2.fc3 js-devel-1.5-2.fc3
Optional Software: Tor
Some grabbers work faster/better if they can operate using The Onion Router (tor) from http://tor.eff.org/. Once Tor is installed, shepherd will automatically find it and start using it. No configuration of Tor is necessary.
Tor is available in RPM form from as http://tor.eff.org/dist/rpm/tor-0.1.1.25-tor.0.rh4_4.i386.rpm and http://dag.wieers.com/packages/libevent/libevent-1.2-1.fc3.rf.i386.rpm
For Debian-based installations, a simple "sudo apt-get install tor" will get things working.
Shepherd automatically checks for new versions of itself and its components, downloads, and executes them. See Security for details and implications.
- Shepherd works from command-line but not automatically via mythfilldatabase
Make sure you have created the symbolic link from tv_grab_au to Shepherd, and that the following command points to your Shepherd executable:
ls -l `which tv_grab_au`If it points somewhere else--for example, if you have an old tv_grab_au script from a previous grabber in /usr/local/bin/--you should delete/replace this with the symlink to Shepherd.
Further information may be gleaned by running mythfilldatabase from the command-line and looking for any error messages between the "-----Start/End of XMLTV output----" lines.
- Guide data doesn't match right channels inside MythTV
It's important that the XMLTV IDs you assigned to channels in Shepherd match those you assigned in MythTV. It doesn't matter what each XMLTV ID is, just that they match. For example, if in the mythtv-setup Channel Editor you have "ABC Melbourne" set to an XMLTV ID of "abc.free.au", you should also specify this as the XMLTV ID for the ABC channel in Shepherd:
- mythfilldatabase keeps adding unwanted channels
- If you are upgrading from the older channel 9 grabber, and you use mythfilldatabase to fetch the data, you may have to add the '--update' option to ensure mythfilldatabase does not try and add missing channels to your video sources. This can be a problem if you have video sources that receive different sets of channels.
- Auto-update fails
- If you're manually upgrading from a previous version because we broke auto-update, it may be necessary to delete your ~/.shepherd/ directory.
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.60.tar.gz tar zxvf js-1.60.tar.gz cd js/src make -f Makefile.ref BUILD_OPT=1 cp js*.h /usr/include/ cp jsopcode.tbl /usr/include/ cd Linux_All_OPT.OBJ cp js*.h /usr/include/ cp libjs.* /usr/include/ ldconfig