Been a bit lax updating with the tweaks to fix rutorrent plugins. Apologies.
Lets start to fix that right now. :>
You'll probably notice that the 'geoip' plugin isn't working. You can check by clicking the Active filter in rutorrent, selecting any torrent, and then clicking the Peers tab.
Not working: The first column will be "IP"
Half-way working: The first column will be "Country", but all will have a ? flag and say "Unknown"
Working: The first column will be "Country" and it'll have the proper flag.
So lets fix it. Start as the root user (or use sudo if you prefer).
Navigate to your plugins folder.
Code:
cd /usr/local/www/rutorrent-users/yourusernamehere/rutorrent/plugins/
cd geoip/
If you can cd into plugins but not geoip, then you're missing the plugin entirely. Go download it. If you can cd into geoip and you see several files owned by your user, then proceed.
Now lets install the pre-reqs.
Code:
pkg install GeoIP
pkg install pecl-geoip
Got it? Great. Now lets find your php config.
Yours is probably at /usr/local/etc/php.ini
Open it in nano or your text editor of choice. Add the following line, save, and exit.
Now lets restart php-fpm and lighttpd to let the change take effect.
Code:
service php-fpm restart
service lighttpd restart
Refresh your rutorrent page. You should now see the "half-way working" symptom above. If you still don't see the column, then you've probably manually unloaded the plugin in rutorrent "plugins" tab or the plugin files are not readable by the web server user (permissions).
You're going to see the "? flag" and Unknown because you don't have a GeoIP database for it to lookup the ip in yet. Lets grab one.
EXIT ROOT NOW. USE YOUR MAIN RUTORRENT USER FOR THESE STEPS.
Code:
cd /usr/local/share/GeoIP
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip -fk GeoIP.dat.gz
You should now have a GeoIP.dat file. Reload rutorrent and all should be 100% functional.
Lastly, we want the database to be updated automagically for us, right? Lets crontab it as a job.
Enter this info. If you're not familiar with vi, now's the time to bone up.
Code:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin
# Order of crontab fields
# min hour mday month wday command
0 3 * * * cd /usr/local/share/GeoIP && wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
5 3 * * * cd /usr/local/share/GeoIP && gunzip -fk GeoIP.dat.gz
Voila. :>