-
Notifications
You must be signed in to change notification settings - Fork 182
Spotweb unRAID server (English)
1. Requirements
You need to have a web server and MySQL running on your server to get SpotWeb to work.
2. Database Setup
SpotWeb doesn't create a database for you, so you need to create an empty database.
Telnet to your unRAID server by running the command mysql -u root -p
Type in mysql password. You should see something like this if you're connected. mysql>
Run the command CREATE DATABASE spotweb;
to create the database and exit
To exit the mysql command.
3. Download SpotWeb
You can either go here and click on 'ZIP' to download the whole repository.. or use GIT to download.
I'm going to assume that you have Sickbeard plugin installed from Influencer.
The reason why is that I don't want to go through necessary packages to install 'git',
and the Sickbeard plugin from influencer already installs them.
So, if you have Sickbeard plugin installed, follow this instruction to get the file.
Otherwise, probably easier just to go to the Github site to download them.
From here, I am assuming that you have Web Root directory as '/mnt/cache/web/'.
If it's somewhere else, change the command according to that.
Telnet to your unRAID if you haven't already, and type in this command to go to web root
cd /mnt/cache/web/
Command to download files needed: git clone -b master https://github.com/spotweb/spotweb spotweb
This will create a sub directory (spotweb) in your webroot and download files from Github.
4. Install SpotWeb
If you followed above steps, you should be able to open install.php file in your web browser with this address:
http://tower:81/spotweb/install.php
(Change Tower:81 to your SimpleFeatures web server setting).
It's okay to have 'NOT OK' for DB::pgsql and Own settings file.
If anything else says something else, try to fix it. Otherwise, hit 'Next'.
Database Settings
Type: mysql
Server: localhost (if localhost doesn't work, type in the name of your server)
Database: spotweb
Username: root
Password: root (or whatever your mysql password is)
You can probably create a new user just to access this, but if you're just trying this out or using it internally, shouldn't matter.
Usenet server settings
You can either choose a server from the dropdown menu and type in the info or choose 'Custom' and put in your usenet server info.
Don't put in the port number. It will cause some error. You can fine tune the server settings after a successful install. Select 'Verify Usenet Server'.
SpotWeb type/Administrative user
Self explanatory. Choose whatever setting you want to use, create a username, then 'Create 'System'.
Installation successful
When you see this message, you're done and you can go to to http://tower:81/spotweb/
.
5. Retrieve NZB's
Don't press the 'Retrieve' button on the page just yet. This is going to take a long time at first.
By default, it will start retrieving from October 2009. If you don't need to go back that far, you can choose the date by going config -> setting -> retrieve
and select the date.
Open the telnet connection to your unRAID machine.
Go to screen by just typing screen
and navigate to your spotweb directory.
In my case it's /mnt/cache/web/spotweb/
. cd /mnt/cache/web/spotweb/
and run the command php retrieve.php
It will start gathering stuff and you should be able to see it on SpotWeb as it updates.
This may take a while. This is why I wanted you to run it under screen.. so just let it run for awhile.
Two useful screen commands: "Detach Screen" = Ctrl + A -> Ctrl + D and "Back to Screen" = screen -r
6. Rewrite Setup
If you want to use SpotWeb with CouchPotato or SickBeard, you need to set this rewrite.
Open the lighttpd.cfg file in '/boot/config/plugins/simpleFeatures/'
or find the file on your flash drive and add this rewrite rule.
url.rewrite-once = ( "^/spotweb/api\?(.*)" => "/spotweb/index.php?page=newznabapi&$1" )
This is if you have it set up so the address for SpotWeb is http://tower:81/spotweb/
If not change your rewrite rule.
Test your API by opening this link http://server/spotweb/api?t=c
7. Schedule Retrieve
You can run these commands to add cron job to run retrieve every two hours.
You can also add these line to go file (/boot/config/go) to set it automatically on boot up.
crontab -l > /tmp/crontab
echo "# SpotWeb Retrieve" >> /tmp/crontab
echo "0 */2 * * * /usr/bin/php /mnt/cache/web/spotweb/retrieve.php >> /var/log/spotweb" >> /tmp/crontab
crontab /tmp/crontab
Remark: Make sure to change '/mnt/cache/web/spotweb/' to wherever you installed your SpotWeb.
If you want to run retrieve every hour, you can change */2 to */1. If you need to run it sooner than that, read this page.