Documentation on compiling NZBGet 15.0 on a SmartOS minimal-64 15.1.1 zone. Perhaps I'll try my hand at contributing to pkgsrc at some point, but for now this will do. NZBGet is a very fast and very lightweight nzb downloader. More information on it can be found here.
pkgin -fy up
pkgin -y fug
pkgin -y in gmake gcc47 unrar p7zip libxml2 unzip
groupadd -g 500 nzbget
useradd -m -c "NZBGet User" -u 500 -g nzbget nzbget
passwd -N nzbget
cd
mkdir build
cd build
wget --no-check-certificate https://github.com/nzbget/nzbget/archive/v15.0.zip
unzip v15.0.zip
cd nzbget-15.0
./configure --prefix=/opt/local --with-libxml2-includes=/opt/local/include/libxml2/ --with-libxml2-libraries=/opt/local/lib/ --disable-curses
make
make install
make install-conf
curl -sk https://gist.githubusercontent.com/baetheus/71533d6358e55342dbb9/raw/nzbget.xml > $HOME/build/nzbget.xml
svccfg import $HOME/build/nzbget.xml
svcadm enable nzbget
The service should now be available at http://<hostname/ip>:6789
User: nzbget
Pass: tegbzn6789
Configuration is located at /opt/local/etc/nzbget.conf
. Additionally, you may wish to change ownership of the nzbget.conf file like so chown root:nzbget /opt/local/etc/nzbget.conf
and give it group write permissions chmod g+w /opt/local/etc/nzbget.conf
so the web interface can save changes to the config. Also, there is a line in the default nzbget.conf for output mode set to curses, since we disabled curses(because I'm too lazy to chase down the build deps in smartos) we should probable change this output config so we don't get bad mojo in our logs: sed -i.bak 's/^\(OutputMode=\).*/\1loggable/' /opt/local/etc/nzbget.conf
.
I store my finished files on a samba share that plex has access to. There isn't much documentation in the man pages for sharectl, automount, and autofs for this. But a bit of trial and error led me to a solution. First, enable the autofs and smb/client services:
svcadm enable -r smb/client
svcadm enable -r autofs
Then edit /etc/auto_master
to map some shares manually:
cat '/mnt/auto auto_manual' >> /etc/auto_master
And create /etc/auto_manual
:
cat 'mountpoint -fstype=smbfs,dirperms=0777,fileperms=0777 //<smb-cifs-hostname-or-ip>/<shared-volume>' > /etc/auto_manual
Then a little autofs restart:
svcadm restart autofs
You'll find your manual mounts under /mnt/auto
. This setup assumes that the share is readable and writeable by guest, which is not a secure setup. Feel free to button it up. Also, I've added another nzbget manifest that has a dependancy on autofs, so that nzbget starts after any remote shares have been mounted.
- Updated to newest stable release and a different zone dataset.
- Fixed links to point to new username.
- Added a note and sed line to fix services logging and on start errors in nzbget.
- Fixed some headings to be a little more descriptive
- Added -y to some of the pkgin commands to make the block copy/pastable.
- Changed build prefix to /opt/local and matched remaining documentation.
- Added gid and uid settings for nzbget user and group.
- Fixed the method_context for smf services to properly address permissions.
- Forgot to add libxml2 dependancy, added it.
- Updated zone and nzbget versions to latest stable.
- Added method env with PATH and HOME to smf script so the default nzbget.conf can correctly call unrar and 7z binaries.
- Added information about setting up automount for samba shares.
- Included alternate nzbget.xml example with a dependancy on autofs for those that use autofs.