Thought I'd post a "how to" on getting SickBeard installed as a service under Windows Vista (x64 if it makes a difference) with SAB running on a FreeNAS box.
I have SickBeard on a Vista PC and SABnzbd+ running on a FreeNAS box and I wanted auto startup of SickBeard.
It was a story of pain (all my own fault and caused by my lack of understanding of Windows I'm afraid), so if even 1 person learns from my mistakes, job done ;)
What I eventually did was this:
1) Downloaded and installed the Windows resource kit from here:
http://download.microsoft.com/download/ ... ktools.exe
2) Copied the files srvany.exe and instsrv.exe from the windows resource kit directory to my SickBeard root install directory (in my case C:\Program Files (x86)\SickBeard) instsrv.exe is the tool that allows you to easily create a windows service and srvany.exe is a dummy program that allows you to specify (via a couple of registry keys) your executable of choice to run....in this case, SickBeard.exe.
3) Droped into a command prompt in my SickBeard root install directory and executed the following:
Code: Select all
instsrv SickBeard "c:\Program Files (x86)\SickBeard\srvany.exe"
4) The above creates the service, now you need to tell it which program to run - in my case, SickBeard.exe, I created a windows .reg file to do this, so it automates the process a little. This is the content of that file, which I called sickbeard_parameters.reg:
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SickBeard\Parameters]
"AppDirectory"="C:\\Program Files (x86)\\SickBeard"
"Application"="C:\\Program Files (x86)\\SickBeard\\SickBeard.exe"
"AppParameters"=""
Create a text file of your choice in your SickBeard root install directory (or somewhere for safe keeping), cut and paste the above into it and either execute it from a command prompt, or double click it from windows explorer etc. Follow the on-screen prompts to add the values to the registry.
5) Use the Windows Services Manager (start>run>services.msc) to set the new "SickBeard" service to start automatically. I personally have set the recovery options to restart the service at every available opportunity
- do this via the "recovery" tab.
6) Start the service using the above tool.
7) Browse to SickBeard and make sure you use a UNC path to your network TV download directory (in my case on one of my FreeNAS boxes). The reason you must use a UNC path rather than just a drive letter is because a Windows Service is unable to use a drive mapping via it's "friendly" name so-to-speak. To do this enter an absolute path to the TV download directory (config>episode downloads>Post-Processing>TV Download Dir) like this:
Code: Select all
\\IP_address\share_name\directory_structure_to_download_directory
In my case this is something like: \\192.168.n.n\data_share\sabnzbd\downloads\complete\TV
This obviously depends upon you having shared out your tv download area using CIFS\SMB and setting appropriate permissions!
8 ) Make sure the check box for "Config>Episode Downloads>Post-Processing>Scan & Process TV Download Dir" is
UNCHECKED
9) Make sure your "Config>Episode Downloads>SABnzbd>Category" is set to
"tv"
10) Configure SABnzbd on your remote box so that
TV sorting is disabled (I am running 0.52 SAB)
11) Copy the Python scripts from the "scripts" sub-directory on your Windows box to an appropriate directory on your server running SAB. Keep a note of the directory.
12) Make a copy of the file autoProcessTV.cfg.sample as autoProcessTV.cfg and edit it to reflec the IP and user creds etc of your Windows PC running SickBeard.
13) Make the scripts directory known to SAB, by using the above noted directory and plugging it into the "Config>Folders>Post-Processing Scripts Folder" box.
14) Under your Config>Categories on SAB (remember I am 0.52, yours might be different), set the script for the "TV" category to "
sabToSickBeard.py"
15) Give SAB a restart and restart the SickBeard Windows service for good measure.
16) With any luck: stand back, light your pipe and admire your handywork
17) Perhaps kick off a test download that you know should be available and check it all works as it should. Mine works a treat!
I know that most of the last section has been covered in various posts/places, but for me, following the information available to get windows to start SickBeard automatically as a service was the holy grail and I was not prepared to give up - having a shortcut to SickBeard in my "all users>start>programs>startup" folder was not an acceptable option as it relies on someone logging in. I like to log in remotely and I don't necessarily always log on to the PC running SickBeard straight after a boot/restart.
ATB,
bikefright.