

Disclaimer
First of all, lets start with the boring stuff. This software is distributed as is, WITHOUT ANY WARRANT of any kind. You use it on your own risk. I accept no liability should your hair catch fire, girlfriend get pregnant or leave you, or any other issue you may encounter directly or indirectly due to your (miss|ab)*use of these instructions. I'm no Linux or Security expert so there may be security issues. This is software we're talking about and there will probably be bugs (maybe it is me, but I have so far never released any software that is free from bugs on the first try). The program is very naive and may lack proper error handling. If you do spot any bugs or security issues, please let me know. I'm eager to learn and will do my best to fix the problems.
Prerequisits
Still with me??? Ok, here goes nothing??!?. My bubba have packages from the Debian repositories that aren't part of Excitos repositories. Due to earlier installs, there may be dependancies that I don't know of. If you find a dependancy I haven't mentioned, let me know.
Here's what I know you need to install:
- hddtemp. johannes has made a howto http://www.excito.org/forum/viewtopic.php?t=417. You need to run it as a deamon because the program will connect to the TCP/IP port.
Net::Telnet (package is named "libnet-telnet-perl").
My files Visit http://medlem.spray.se/sixfeetfive/temp/ (not much to see yet) and write down (or copy link) the version number of the latest version (but don't download it just yet, we will use wget later). I haven't had any time writing proper instructions so there isn't much to see in this tar file.
I'm not very good at writing instructions. Writing them in another language surely doesn't help, so you may have to read between the lines here and there. There are plenty of good instructions on how to do some of the tasks mentioned here, just search the forum or the internet.
Now, log in as root, install hddtemp, following johannes instructions, and while you're at it, throw in
Code: Select all
apt-get install libnet-telnet-perl
Code: Select all
wget http://medlem.spray.se/sixfeetfive/temp/BubbaMon-X.Y.tgz
tar xzf BubbaMon-X.Y.tgz
mkdir -p /home/johan/scripts/BubbaMon
mv BubbaMon-X.Y/* /home/johan/scripts/BubbaMon
nano /home/johan/scripts/BubbaMon/BubbaMon.pl
Examine the settings at the top of BubbaMon.pl and change them to fit your needs. Pay special attention to the "use lib ..." part, it is important that you update the path here to the folder you installed the files to.
Output from the cronjob will be captured to a file named BubbaMon.log (or what ever you name it). If you don't see anything on the SoundBridge display when you expect to, examine this file. Note that it'll be overwritten on each run. First you may have to change access rights so www-data (we will run the script as this user) can write to this file. Type
Code: Select all
touch /home/johan/scripts/BubbaMon/BubbaMon.log
chmod o+rw /home/johan/scripts/BubbaMon/BubbaMon.log
We need to communicate with the file transfer daemon over a message queue. In order to read/write on this queue, we need proper rights. Root and www-data both have read/write access, but we don't want to run the script as root, so we enter the cron job in www-datas cron table. Type
Code: Select all
crontab -e -u www-data
Code: Select all
*/10 * * * * /usr/bin/perl /home/johan/scripts/BubbaMon/BubbaMon.pl [USERNAME] &>/home/johan/scripts/BubbaMon/BubbaMon.log

Crontab allows you to have even more complex rules, like only running this script during day time. Search the internet for more info on crontab.
There you have it, I think that's all there is to it. You should be able to monitor your downloads on the SoundBridge.
Have fun.... Let me know what you think of it, what could be better, features for the future......
Best regards,
Johan