Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Tue Jan 23, 2018 2:49 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 101 posts ]  Go to page Previous 13 4 5 6 7 Next
Author Message
PostPosted: Wed Sep 23, 2009 10:09 pm 
Offline
Total Newbie

Joined: Mon Sep 21, 2009 11:45 pm
Posts: 4
Fantastic Tut.
Thanks so much for all the effort, from all involved, in work such as this.
Power To The People :up:


Top
   
PostPosted: Tue Dec 22, 2009 12:45 pm 
Offline
Newbie

Joined: Sat Jun 27, 2009 7:47 am
Posts: 43
This thread is confusing

Anychance of a concise HOWTO: nzbget in one place of what to do in easy steps from the time you have bought a Buffalo Linkstation so we all follow the same procedure from the time we have unpacked our new NAS ?


Top
   
PostPosted: Mon Jan 04, 2010 8:05 pm 
Offline
Newbie

Joined: Sun Jan 03, 2010 7:48 pm
Posts: 18
Hey guys!

I almost got everything working. I set up nzbget as in the guide, but no downloads gets unrared.

Code:
# NOTE: an example script for unrarring is provided within distribution 
# in file "postprocess-example.sh".
PostProcess=/opt/share/doc/nzbget/postprocess.sh


My postprocess is like this:

Code:
# Template configuration file for postprocessing script postprocess-example.sh.
# Please refer to postprocess-example.sh for usage instructions.

##############################################################################
### PATHS                                                                  ###

# Set the full path to unrar if it is not in your PATH.
UnrarCmd=unrar


##############################################################################
### OPTIONS                                                                ###

# Delete rar-files after unpacking (yes, no).
DeleteRarFiles=yes

# Rename img-files to iso (yes, no).
RenameIMG=yes

# Joint TS-files (yes, no).
JoinTS=yes

##############################################################################
### POSTPROCESSING-PARAMETERS                                              ###

# This section defines parameters, which can be set for each nzb-file
# individually using either web-interface or command line.
# Example command line for setting parameter password to value 123 for
# nzb-file with id=2
#    nzbget -E G O Password=123 2

# Perform postprocessing (yes, no).
#
# Set to no to skip postprocessing for this nzb-file.
PostProcess=yes

# Password for encrypted posts.
#
# If the post requires a password for unpacking.
Password=

# Destination directory.
#
# NOTE NZBGet must have write-access-rights for that directory.
DestDir=


What am I missing here?

chmod +x /opt/share/doc/nzbget/postprocess.sh did not do the trick.

Anyone? Thanks :)


Top
   
PostPosted: Tue Jan 05, 2010 10:19 am 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2604
You do have "unrar" on your LS installed, haven't you?

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
   
PostPosted: Tue Jan 05, 2010 2:06 pm 
Offline
Newbie

Joined: Sun Jan 03, 2010 7:48 pm
Posts: 18
Sure I have it installed :-)

I managed to make it work.

Now my only problem is when the download is finished and the postprocess scripts starts everything is fine. The files are all extracted, but the rar files are all kept.

My script now looks like this:

Code:
#!/bin/sh 
#
# NZBGet post-process script
# Script will unrar downloaded rar files, join ts-files and rename img-files to iso.
#
# Copyright (C) 2008 Peter Roubos <peterroubos@hotmail.com>
# Copyright (C) 2008 Otmar Werner
# Copyright (C) 2008 Andrei Prygounkov <hugbug@users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#

#######################    Settings section     #######################

# Set the full path to unrar if it is not in your PATH
UnrarCmd=unrar

# Delete rar-files after unpacking (1, 0)
DeleteRarFiles=yes

# Joint TS-files (1, 0)
JoinTS=yes

# Rename img-files to iso (1, 0)
RenameIMG=yes

####################### End of settings section #######################

# NZBGet passes following arguments to postprocess-programm as environment
# variables:
#  NZBPP_DIRECTORY    - path to destination dir for downloaded files;
#  NZBPP_NZBFILENAME  - name of processed nzb-file;
#  NZBPP_PARFILENAME  - name of par-file or empty string (if no collections were
#                       found);
#  NZBPP_PARSTATUS    - result of par-check:
#                       0 = not checked: par-check disabled or nzb-file does
#                           not contain any par-files;
#                       1 = checked and failed to repair;
#                       2 = checked and successfully repaired;
#                       3 = checked and can be repaired but repair is disabled;
#  NZBPP_NZBCOMPLETED - state of nzb-job:
#                       0 = there are more collections in this nzb-file queued;
#                       1 = this was the last collection in nzb-file;
#  NZBPP_PARFAILED    - indication of failed par-jobs for current nzb-file:
#                       0 = no failed par-jobs;
#                       1 = current par-job or any of the previous par-jobs for
#                           the same nzb-files failed;
#  NZBPP_CATEGORY     - category assigned to nzb-file (can be empty string).


if [ "$NZBPP_DIRECTORY" = "/mnt/disk1/share/usenet" ]
then
   echo "*** NZBGet post-process script ***"
   echo "This script is supposed to be called from nzbget."
   exit
fi

echo "[INFO] Unpack: Post-process script successfully started"

# Check if all is downloaded and repaired
if [ ! "$NZBPP_NZBCOMPLETED" -eq 1 ]
then
   echo "[INFO] Unpack: Not the last collection in nzb-file, exiting"
   exit
fi
if [ ! "$NZBPP_PARSTATUS" -eq 2 ]
then
   echo "[WARNING] Unpack: Par-check failed or disabled, exiting"
   exit
fi
if [ ! "$NZBPP_PARFAILED" -eq 0 ]
then
   echo "[WARNING] Unpack: Previous par-check failed, exiting"
   exit
fi

# All OK, processing the files
cd "$NZBPP_DIRECTORY"

# Make a temporary directory to store the unrarred files
mkdir extracted
   
# Remove the Par files
echo "[INFO] Unpack: Deleting par2-files"
rm *.[pP][aA][rR]2
   
# Unrar the files (if any) to the temporary directory, if there are no rar files this will do nothing
if (ls *.rar >/dev/null)
then
    echo "[INFO] Unpack: Unraring"
   $UnrarCmd x -y -p- -o+ "*.rar"  ./extracted/
fi

if [ $JoinTS -eq 1 ]
then
   # Join any split .ts files if they are named xxxx.0000.ts xxxx.0001.ts
   # They will be joined together to a file called xxxx.0001.ts
   if (ls *.ts >/dev/null)
   then
       echo "[INFO] Unpack: Joining ts-files"
      tsname=`find . -name "*0001.ts" |awk -F/ '{print $NF}'`
      cat *0???.ts > ./extracted/$tsname
   fi   
   
   # Remove all the split .ts files
    echo "[INFO] Unpack: Deleting source ts-files"
   rm *0???.ts
fi
   
# Remove the rar files
if [ $DeleteRarFiles -eq 1 ]
then 
    echo "[INFO] Unpack: Deleting rar-files"
   rm *.r[0-9][0-9]
   rm *.rar
   rm *.s[0-9][0-9]
fi
   
# Go to the temp directory and try to unrar again. 
# If there are any rars inside the extracted rars then these will no also be unrarred
cd extracted
if (ls *.rar >/dev/null)
then
    echo "[INFO] Unpack: Calling unrar (second pass)"
   $UnrarCmd x -y -p- -o+ "*.rar"

   # Delete the Rar files
   if [ $DeleteRarFiles -eq 1 ]
   then 
       echo "[INFO] Unpack: Deleting rar-files (second pass)"
      rm *.r[0-9][0-9]
      rm *.rar
      rm *.s[0-9][0-9]
   fi
fi
   
# Move everything back to the Download folder
mv * ..
cd ..
   
# Clean up the temp folder
echo "[INFO] Unpack: Cleaning up"
rmdir extracted
chmod -R a+rw .
rm *.nzb
rm *.1
rm .sfv
rm _brokenlog.txt

if [ $RenameIMG -eq 1 ]
then
# Rename img file to iso
# It will be renamed to .img.iso so you can see that it has been renamed
   if (ls *.img >/dev/null)
   then
       echo "[INFO] Unpack: Renaming img-files to iso"
      imgname=`find . -name "*.img" |awk -F/ '{print $NF}'`
      mv $imgname $imgname.iso
   fi   
fi
PostProcess=yes



I get the following from webgui:

Code:
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: All OK
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: /opt/sbin/postprocess-example.sh: line 107: [: yes: integer expression expected
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: /opt/sbin/postprocess-example.sh: line 124: [: yes: integer expression expected
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: ls: cannot access *.rar: No such file or directory
INFO   Tue, 05 Jan 2010 22:03:16 +0900 Unpack: Cleaning up
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: rm: cannot remove `*.1': No such file or directory
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: rm: cannot remove `.sfv': No such file or directory
DETAIL   Tue, 05 Jan 2010 22:03:16 +0900 Post-Process: rm: cannot remove `_brokenlog.txt': No such file or directory


What am I doing wrong?


Top
   
PostPosted: Tue Jan 05, 2010 7:15 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2604
You set the variables to "yes" instead of "1".
Look at "JoinTS" for example. The comment above says "(0,1)" and you inserted
"yes".
That's plain wrong, because later on, the content of JoinTS is compared to the
numeric value of "1". That's the reason for your error message.
JoinTS is not the only one you set wrong but I leave it to you, as an excercise,
to determine which ones. :-)

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
   
PostPosted: Tue Jan 05, 2010 10:02 pm 
Offline
Newbie

Joined: Sun Jan 03, 2010 7:48 pm
Posts: 18
kenatonline wrote:
You set the variables to "yes" instead of "1".
Look at "JoinTS" for example. The comment above says "(0,1)" and you inserted
"yes".
That's plain wrong, because later on, the content of JoinTS is compared to the
numeric value of "1". That's the reason for your error message.
JoinTS is not the only one you set wrong but I leave it to you, as an excercise,
to determine which ones. :-)


Ahh great. Thanks a lot - that the the trick!


Top
   
PostPosted: Mon Jan 18, 2010 2:45 pm 
Offline
Total Newbie

Joined: Mon Jan 18, 2010 12:00 pm
Posts: 2
blexley wrote:
This thread is confusing

Anychance of a concise HOWTO: nzbget in one place of what to do in easy steps from the time you have bought a Buffalo Linkstation so we all follow the same procedure from the time we have unpacked our new NAS ?


seconded or perhaps there is a new post out there with this


Top
   
PostPosted: Sat Jan 23, 2010 10:41 am 
Offline
Regular Member

Joined: Wed Jul 26, 2006 4:06 pm
Posts: 129
Assuming you're using an ARM9 LinkStation (Linkstation Pro and original Linkstation Live)

1. Open and bootstrap your LS: viewtopic.php?p=39162#p39162

Note that the bootstrap script version changes occasionally, so currently the script is at:
Code:
http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/lspro-bootstrap_1.2-7_arm.xsh

-- amend the instructions in step 1. accordingly.

2. Enable telnet, as described. Telnet in to the LinkStation and type the following:
Code:
ipkg update
ipkg upgrade
ipkg install nzbget


You may need to ipkg install unrar or other dependencies.

3. Download nzbgetweb and put it in /opt/share/www/nzbgetweb/ . Current version: http://sourceforge.net/projects/nzbget/ ... p/download

4. Go to http://linkstation_ip_address:8081/nzbgetweb/
and configure nzbget completely from the web interface -- add your news server etc.

I think that's all of it. If there's anything missing, let me know.
I was a complete Linux n00b before getting my LinkStation, so it's possible to learn all this stuff. If there are terms you are unfamiliar with, Google is your friend.


Top
   
PostPosted: Sun Jan 24, 2010 2:03 pm 
Offline
Newbie

Joined: Sat Jun 27, 2009 7:47 am
Posts: 43
neilt0 wrote:
Assuming you're using an ARM9 LinkStation (Linkstation Pro and original Linkstation Live)

1. Open and bootstrap your LS: viewtopic.php?p=39162#p39162

Note that the bootstrap script version changes occasionally, so currently the script is at:
Code:
http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/lspro-bootstrap_1.2-7_arm.xsh

-- amend the instructions in step 1. accordingly.

2. Enable telnet, as described. Telnet in to the LinkStation and type the following:
Code:
ipkg update
ipkg upgrade
ipkg install nzbget


You may need to ipkg install unrar or other dependencies.

3. Download nzbgetweb and put it in /opt/share/www/nzbgetweb/ . Current version: http://sourceforge.net/projects/nzbget/ ... p/download

4. Go to http://linkstation_ip_address:8081/nzbgetweb/
and configure nzbget completely from the web interface -- add your news server etc.

I think that's all of it. If there's anything missing, let me know.
I was a complete Linux n00b before getting my LinkStation, so it's possible to learn all this stuff. If there are terms you are unfamiliar with, Google is your friend.



Thanks neilt0


Top
   
PostPosted: Sun Feb 21, 2010 11:09 am 
Offline
Newbie

Joined: Sat Jun 27, 2009 7:47 am
Posts: 43
Buffalo have added a voting section for new features to be added to the official Firmware.

Idea Exchange Lounge

http://forums.buffalotech.com/t5/Idea-E ... idb-p/2001


To vote for official Newsgroup Binary Download Client NZBget register at the forum then go to this link and click the up arrow to register a vote.

NAS - All Version - Newsgroup Binary Download Client - NZBget

http://forums.buffalotech.com/t5/Idea-E ... di-p/24189



.


Top
   
PostPosted: Sat Feb 27, 2010 8:00 am 
Offline
Newbie

Joined: Sat Jun 27, 2009 7:47 am
Posts: 43
Is lighttpd supposed to be flakey ?

It keeps stopping.

Even worse with fastcgi enabled.


Top
   
PostPosted: Tue May 25, 2010 8:57 pm 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 295
Thanks again to Neilt0 for helpful posts like how to get post process script working. I had this working some while back and was exchanging emails with the developer suggesting improvements like the mobile interface but I've been out for a while. Now, back on LS (XHL now!) and NZBget happily downloads at 50mbit whilst the box does other duties like server and torrent box.

Awesome little machines :up:

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
   
 Post subject:
PostPosted: Wed Jul 07, 2010 5:47 pm 
Offline
Newbie

Joined: Tue Mar 09, 2010 9:32 am
Posts: 13
I am massively stuck with this :(

I've got nzbget installed, lighttpd installed, and attempting to get nzbgetweb running.

It's a problem with lighttpd, as I can go to http://linkstation:8081 and it works, whereas if I go to http://linkstation:8081/nzbgetweb/ I get nothing.
If I go to http://linkstation:8081/nzbgetweb/README I don't even get to view the file contents.

As stated in a previous response, I need to edit the php.ini, but I can't find the location! Where is it?!?

HELP!!!


Top
   
PostPosted: Wed Jul 07, 2010 8:02 pm 
Offline
Newbie

Joined: Tue Mar 09, 2010 9:32 am
Posts: 13
Ok, Sorted...Mostly.

Connected to nzbget, and I can download through it if I manually put files into the queue directory.

If I try and do it through it through the web interface I get an error to check my file permissions.

I also have a problem with the interface seemingly crashing. I can access the stock page for lighttpd, but the webconsole won't resolve.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 101 posts ]  Go to page Previous 13 4 5 6 7 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited