Please Add support for TAR files
Re: Please Add support for TAR files
Use this NZB with a tar file on your setup: https://www.appelboor.com/dump/reftestn ... 37874f.nzb
Do you get a tar file?
If so, proceed:
This is the post-processing script that takes care of untarring a tar file:
Put it as "untar_it.sh" in your SABnzbd script folder (see http://127.0.0.1:8080/sabnzbd/config/folders/ ).
then: make it executable with
The do the above download again, and select untar_it.sh as post-processing script.
SAB will show the logging:
Do you get a tar file?
If so, proceed:
This is the post-processing script that takes care of untarring a tar file:
Code: Select all
#!/bin/bash
set -e # bail out in case of any problem
echo "$1"
cd "$1"
pwd
for f in *.tar; do
echo $f
tar -xvf "$f"
done
dir
then: make it executable with
Code: Select all
chmod +x untar_it.sh
SAB will show the logging:
Code: Select all
/media/sander/6665-6464/reftestnzb___tar-file___92c85a37874f
/media/sander/6665-6464/reftestnzb___tar-file___92c85a37874f
reftestnzb___tar-file___92c85a37874f.tar
./
./three.txt
./fout.txt
./two.txt
./one.txt
fout.txt one.txt reftestnzb___tar-file___92c85a37874f.tar three.txt two.txt
Re: Please Add support for TAR files
Ok I got it.
But the script's name does not show up in the selection box.
So I cannot apply it on the nzb.
Moreover I understand that I have to do this script selection on each of the nzb concerned.
That is a problem.
I don't know beforehand which has a tar file and which doesn't.
And i cannot throw a bulk of files in the watched folder because when they are caught by Sabnzbd you cannot set a script for them afterwards.
I wish they implement that as an automatique step activated every time there is a tar file. This is already happening when a zip file is encountered.
But the script's name does not show up in the selection box.
So I cannot apply it on the nzb.
Moreover I understand that I have to do this script selection on each of the nzb concerned.
That is a problem.
I don't know beforehand which has a tar file and which doesn't.
And i cannot throw a bulk of files in the watched folder because when they are caught by Sabnzbd you cannot set a script for them afterwards.
I wish they implement that as an automatique step activated every time there is a tar file. This is already happening when a zip file is encountered.
Re: Please Add support for TAR files
You need to have the X bit (execute permission) set on the script file and it has to be in your Scripts folder. That's also documented in the link provided by sanderjo.
In Config > Categories you can set this script for your Default category. This will run the script for every job in any category.
If there's no tar files, it will just not do anything.
We can't integrate everything. We are trying to help you with a fast solution here.
In Config > Categories you can set this script for your Default category. This will run the script for every job in any category.
If there's no tar files, it will just not do anything.
We can't integrate everything. We are trying to help you with a fast solution here.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Please Add support for TAR files
I am pretty sure I did everything you asked, and yet the script does not appear in the selectable box.
As if Sabnzbd simply does not see it.
root@Novanas2:/mnt/cache# cd appdata/binhex-sabnzbd/
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# ls
admin/ sabnzbd.ini supervisord.log.1 supervisord.log.4
logs/ sabnzbd.ini.bak supervisord.log.2 supervisord.log.5
perms.txt supervisord.log supervisord.log.3 untar_it.sh*
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# chmod +x untar_it.sh
This is from Putty. I don't know what else to do....
As if Sabnzbd simply does not see it.
root@Novanas2:/mnt/cache# cd appdata/binhex-sabnzbd/
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# ls
admin/ sabnzbd.ini supervisord.log.1 supervisord.log.4
logs/ sabnzbd.ini.bak supervisord.log.2 supervisord.log.5
perms.txt supervisord.log supervisord.log.3 untar_it.sh*
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# chmod +x untar_it.sh
This is from Putty. I don't know what else to do....
Re: Please Add support for TAR files
Ok... some progress....
Now I get
"ScriptExit(-1) Cannot run script /config/untar_it.sh"
Now I get
"ScriptExit(-1) Cannot run script /config/untar_it.sh"
Re: Please Add support for TAR files
With SSH, login on your Unraid Server. There and then:
Code: Select all
/config/untar_it.sh blablabla
Re: Please Add support for TAR files
I don't know what that means so I am posting it.
root@Novanas2:~# cd /mnt/cache/appdata/binhex-sabnzbd/
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# ls
admin/ sabnzbd.ini.bak supervisord.log.4
logs/ supervisord.log supervisord.log.5
perms.txt supervisord.log.1 untar_it.sh*
reftestnzb___tar-file___92c85a37874f.tar supervisord.log.2
sabnzbd.ini supervisord.log.3
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# untar_it.sh reftestnzb___tar-file___92c85a37874f.tar
-bash: ./untar_it.sh: /bin/bash^M: bad interpreter: No such file or directory
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd#
root@Novanas2:~# cd /mnt/cache/appdata/binhex-sabnzbd/
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# ls
admin/ sabnzbd.ini.bak supervisord.log.4
logs/ supervisord.log supervisord.log.5
perms.txt supervisord.log.1 untar_it.sh*
reftestnzb___tar-file___92c85a37874f.tar supervisord.log.2
sabnzbd.ini supervisord.log.3
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd# untar_it.sh reftestnzb___tar-file___92c85a37874f.tar
-bash: ./untar_it.sh: /bin/bash^M: bad interpreter: No such file or directory
root@Novanas2:/mnt/cache/appdata/binhex-sabnzbd#
Re: Please Add support for TAR files
Your script has the wrong line-ending characters. You'll need to convert it with 'dos2unix' or else save it with the correct characters from within a supported text editor.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: Please Add support for TAR files
Finally! Thanks. I used Notepad++ to convert it. Now it works.
Just one last question. Why does the tar process outputs the list of files uncompressed within the Sabnzbd web interface, right on the status line
"fout.txt one.txt reftestnzb___tar-file___92c85a37874f.tar three.txt two.txt" ?
A simple "Unpack successful" would suffice.
What will happen when a tar file contains thousands of files?
Re: Please Add support for TAR files
then put
Code: Select all
echo "Unpack successful"
Re: Please Add support for TAR files
Hello again,
Thank you for the quick resolution of my problem. It works great with .tar files.
But now for the other kind of downloads which represents 99% I guess I get "Script exit code is 2" and the Retry flag lit even though the Unpack went totally fine.
Is there something we can add in the script to disregard all other kinds of files and behave transparently?
Thank you for the quick resolution of my problem. It works great with .tar files.
But now for the other kind of downloads which represents 99% I guess I get "Script exit code is 2" and the Retry flag lit even though the Unpack went totally fine.
Is there something we can add in the script to disregard all other kinds of files and behave transparently?
Re: Please Add support for TAR files
send an example NZB to safihre@...
And post the output of the script here.
And post the output of the script here.
Re: Please Add support for TAR files
Use this altered script:
Code: Select all
#!/bin/bash
set -e # bail out in case of any problem
echo "$1"
cd "$1"
pwd
find . -name "*.tar" -type f -print0 | xargs -0 tar -xvf
dir
Re: Please Add support for TAR files
Hello,
Here is the result
"Retry Regarding Henry 1991 COMPLETE BLURAY-MTKTI Script exit code is 123"
Of course it shows in red like an error.
Here is the result
"Retry Regarding Henry 1991 COMPLETE BLURAY-MTKTI Script exit code is 123"
Of course it shows in red like an error.