I actually thought about doing this myself, but seems things are already rolling.
Anyway, I would be willing to test this stuff out (if you need people to test that is).
Currently using all of them in a "home made" jail on 8.0.4.
I actually thought about doing this myself, but seems things are already rolling.
Anyway, I would be willing to test this stuff out (if you need people to test that is).
Currently using all of them in a "home made" jail on 8.0.4.
HP Microserver N36L - AMD Athlon™ II NEO N36L
RAM - 2x4GB (8GB) ECC
HDD - 5x2TB WD 4kb sector
OS - Freenas v8.0.2
feel free to help, the problem is that sabnzbd / sickbeard / python2.7 stuff isn't in the freebsd ports tree. this can all be fixed by packaging the needed dependencies within the pbi. I'm still need to figure out how the pbi is made. Anyway I've gotten a working rc script for sabnzbd and sickbeard, I'll try to get couchpotato and headphones done by tomorrow night.
The next step is getting is getting everything packaged up
finally we need a way to edit some settings from the freenas gui (they'll just edit the respective config files). We at least need the freenas gui to be able to change sabnznbd_enable="YES/NO" in /etc/rc.conf
Here's a little trick you can use to edit the rc.conf from a script:
The -i '' (TWO single quotes) this overwrites the exising file, so test without it to make sure substition works firstCode:sed -i '' -e 's/old_string/new_string/' /etc/rc.conf
The other quote marks are single back-ticks, usually on the same key as the ~ mark, these are required also.
I can't imagine that they don't have some type of method for flipping the value of that variable from the GUI.
Perhaps you can disect one of the other plugins to see how it gets done.
I don't have much time to put into helping right now, but I'll keep an eye out and see if I can add any helpful tips.
I've got the files setup and can create pbi's with 'pbi_create'
I'll post my source / pbi once I get couchpotato and headphones done, though I believe the way frenas unpacks pbi's is different then the standard way. My 'external-links' doesn't seem to work (need this to link my rc scripts). My 'resources/tweak-rcconf' also doesn't seem to edit my rc.conf file correctly. Though if I manually run these scripts later everything works.
Just wanted to say a quick thanks to you both on behalf of myself and anyone else who rely on these add-ons. The complications of installing a working version of Serviio and Sab/CP etc have held me back from updating to 8 thus far. Proto, you might remember me from you blog board on the same subject. I have a Samsung TV and only Serviio seems to work with it so I am truly grateful. Keep up the good work guys, watching with interest.
Here I'll post what I've come up against in trying to create a pbi for FreeNAS for Sickbeard / Sabnzbd
*The ideal method for creating a pbi requires we have a port in the ports tree, sabnzbd doesn't have a current port in the ports tree. We could easily make one but it'd be based on python2.6 because that's what's in the ports tree for FreeBSD 8.2.
Python 2.7 is preferred for sabnzbd but more importantly FreeNAS has python2.7 installed. So basically we can't add python libraries (as package dependencies) to freenas because we'd need python2.7 stuff which isn't in the FreeBSD 8.2 ports tree. All of this could be fixed if our python version matched our ports tree, I think this will be fixed when FreeNAS is based off of FreeBSD 9.0 / 8.3 in the hopefully near future.
####
*What I'm doing instead is using the pbi_create command to create a pbi from a directory and a config directory.
*grab my source folder at http://eto.homeip.net/usenet-source.tar.gz it contains..
-tagert directory 'usenet' (with dependencies / rc.d files / latest Sabnzbd Sickbeard / sickbeard config folder)
-config directory 'config' (creates external-links / tweak-rcconf)
-make.sh (creates usenet-0.1-amd64.pbi + usenet-0.1-amd64.pbi.sha256)
~this script does some screwy stuff, I move the target directory because that's the only way I could get the links in the right place (see /usr/pbi/usenet-amd64/.sbin/install-pathlinks.sh)
URGENT TODO
*integrate couchpotato / headphones
*add status command to rc files
*a bunch of gui stuff (check status, enable/disable + start/stop, mount media directory)
FUTURE TODO
*run as non root user
*more gui options (ports to listen on?)
*a way from the gui to update sab, a simple script tied to the gui do this. It would need the version number though.
###
Ways you can test for now
-download zip, unzip, place into jail
-run ./make.sh
-download /root/usenet-0.1-amd64.pbi and /root/usenet-0.1-amd64.pbi.sha256
-install through gui
-tweak rc.conf file '/usr/pbi/usenet-amd64/tweak-rcconf'
-start sab nzbd/sickbeard from commandline with 'service sabnzbd/sickbeard start/stop'
To start hacking
-stop any running services (sabnzbd/sickbeard)
-uninstall usenet through gui
-edit source folder
-make / download / install / test
Last edited by Joshua Parker Ruehlig; 03-12-2012 at 11:45 AM.
This is basically a revision of my last post, I summarized everything again here so read this one for latest info.
SOURCE
http://eto.homeip.net/usenet-0.2.tar.gz
PBI's (still need you to edit /etc/rc.conf and start services)
http://eto.homeip.net/usenet-0.2-pbi.tar.gz
CHANGES
-added couchpotato, headphones
-have 'scripts/post-install.sh' grab the latest SABnzbd / SickBeard / CouchPotato / Headphones
-split into 4 seperate plugins
WHAT NEEDS TO BE DONE BEFORE RELEASE
(please contribute what you can, if someone wants to throw the source up on github I'd be happy so multiple people could contribute)
-status loop 'etc/rc.d/' files*
-stop services on uninstall 'scripts/pre-remove.sh'*
-start/stop from gui 'resources/control'
-Mounting 'resources/mp_edit.html'
-enable/disable from gui 'resources/edit.html' (would edit /etc/rc.conf)
*=I'll work on this soon
WHAT COULD BE DONE
-32bit version (only unzip, par2cmdline, and unrar need to be changed)
-run as non root user (would need to create user in 'scripts/post-install.sh')
-cleanup unused files 'lib/' (would also need to edit external-links)
-SABnzbd update from GUI (not already built into sabnzbd =[ )
-backup/restore config (maybe even logs but config.ini files should be enough at first)
WARNING
-this could mess up your jail, and possibly stop your FreeNAS gui from working. Be ready to have to reboot or even reinstall FreeNAS from a cd if your GUI gets broken. you've been warned.
Last edited by Joshua Parker Ruehlig; 03-12-2012 at 11:20 PM.
Hi Joshua,
Yesterday I've updated to FreeNAS 8.2 and noticed my custom made downloaders script (SABnzbd, SickBeard, CouchPotato, Headphones) didn't work anymore. So .. I'm waiting for you to get things working
Keep up the good work.
RVNAS: Case: Fractal Design Array R2, Mobo: Asus E35M1-I Deluxe (AMD E-350), Storage: 8GB DDR3 (1066Mhz), 3x Samsung ECOgreen 1.5TB, 1x Samsung ECOgreen 2.0TB running FreeNAS-8.0.2-RELEASE-amd64
I'll take a look tomorrow evening and see what I can do. It looks like the Serviio plugin won't be that difficult, more about that later.
Did something happen that made you say this? Technically the jail is isolated from FreeNAS and shouldn't cause any problems unless there's a bug, but it is possible to mess up the jail if the plugin doesn't work right.WARNING
-this could mess up your jail, and possibly stop your FreeNAS gui from working. Be ready to have to reboot or even reinstall FreeNAS from a cd if your GUI gets broken. you've been warned.
There's definitely some error checking that needs to be done in the GUI. I should try and open some tickets before the release or there's going to be some confusion and mistakes when people try to install plugins.
I'm wonder what artifacts may be left behind if a jail is deleted improperly. Anyway, it's getting late for me.
Thanks for your effort to figure this out and post the details, nice work.