| Issue 37: | Understand why torrentexpander-CSI don't work | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Over 100 download of working version. Only few search on scraper. The users is not the problem. It can't be. So...what's the problem? 1) First problem: tar issue on A100 devices. http://www.networkedmediatank.com/showthread.php?tid=56777&pid=527543#pid527543 I will solve it now. I know how to do. 2) (hypothesis) Missing depandancies. How to solve? Add self-check of all TorrentExpander required software (cat, cp, mv, unrar, unzip, ...). If something is missing, add to torrentexpander_debug. 3) Users are lazy They don't report if the program don't works. We could add an 'send error report by email' future? (Enabled by default)
Dec 14, 2011
Project Member
#1
login...@gmail.com
Dec 14, 2011
I am planning to go a bit further I was already planning to check all binaries and fetch their path on first run. Also, I was planning to replace all standard commands by the corresponding full path variable. This should make torrentexpander cron friendly and should solve all common issues. I will get on it this week-end What if a script download script is already indicated in the transmission json script. It looks like your installer will fail to update the line. Your sed line seems to look for : "script-torrent-done-filename": ""
Dec 14, 2011
Can't understand last 3 lines. My installer replace "script-torrent-done-filename": "" with full tx path on installation and restore it when removed. Updating torrentexpander through CSI is done by automatically removing old version and installing new. So the line were changed 3 times. Installing: blanck --> full-path Updating full-path --> blanck blanck --> full-path
Dec 14, 2011
Here's my point : What if I already had a unrar script path in my transmission json settings path ? Sed wouldn't find the line when looking for "script-torrent-done-filename": "" Also, are you sure you shouldn't edit the line to "script-torrent-done-filename": "\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh $TR_TORRENT_DIR/$TR_TORRENT_NAME" instead of "script-torrent-done-filename": "\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh" only ?
Dec 14, 2011
1) In this case setup don't work. 2) MmMmm.... I forget it... But when i have tryed with a real torrent over transmission, program worked well. I'm going to edit.
Dec 14, 2011
Also, i'm not sure that is the right way: /share/Apps/Transmission/daemon.sh stop wait I need to wait until application is fully stopped. Is there a better way? I don't like this way: /share/Apps/Transmission/daemon.sh stop sleep 4
Dec 15, 2011
About comment nr. 4, could you send me correct sed command? this don't works: cat /share/Apps/Transmission/config/settings.json | sed 's/"script-torrent-done-enabled": false,/"script-torrent-done-enabled": true,/g' | sed 's/"script-torrent-done-filename": "",/"script-torrent-done-filename": "\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh $TR_TORRENT_DIR\/$TR_TORRENT_NAME",/g'> /share/Apps/Transmission/config/settings.json
Dec 15, 2011
Hi I was thinking of a line that looks a bit like this. Give it a try. cat /share/Apps/Transmission/config/settings.json | sed 's/^\( *\)"script-torrent-done-enabled"\: .*$/\1"script-torrent-done-enabled": true,/g' | sed 's/^\( *\)"script-torrent-done-filename": .*$/\1"script-torrent-done-filename": "\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh \$TR_TORRENT_DIR\/\$TR_TORRENT_NAME",/g'> /share/Apps/Transmission/config/settings.json Let me know how it works for you
Dec 15, 2011
Regarding the issue you're facing with the daemon, I may have an idea. Is there a file i could check against (availability, write permission, etc...) ?
Dec 15, 2011
The line provided works well. Please send 'revert' line also. No useful file found, could you use 'pgrep'? i have this idea, we could stop the daemon and use this string to confirm: while [ $(pgrep transmission) != "" ]; then sleep 1
Dec 16, 2011
Here are the lines I suggest Install : cat /share/Apps/Transmission/config/settings.json | sed 's/^\( *\)\"script-torrent-done-enabled\"\: .*$/\1\"script-torrent-done-enabled\"\: true\,/g' | sed 's/^\( *\)\"script-torrent-done-filename\"\: .*$/\1\"script-torrent-done-filename\"\: \"\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh \$TR_TORRENT_DIR\/\$TR_TORRENT_NAME\"\,/g' > /share/Apps/Transmission/config/settings.json Uninstall : cat /share/Apps/Transmission/config/settings.json | sed 's/^\( *\)\"script-torrent-done-enabled\"\: .*$/\1\"script-torrent-done-enabled\"\: false\,/g' | sed 's/^\( *\)\"script-torrent-done-filename\"\: .*$/\1\"script-torrent-done-filename\"\: \"\",/g' > /share/Apps/Transmission/config/settings.json Exit transmission : /share/Apps/Transmission/daemon.sh stop while [ $(pgrep transmission) ]; do sleep 1; done Also, maybe you should make sure all users are running transmission at root level and not the nmt user. If they run as nmt, they may face unexpected results with the permissions set in the settings.ini file included in the installer.
Dec 16, 2011
Thanks. is it possible to have timeout on while command?
Dec 17, 2011
Example with 60 seconds count=0 while [ $(pgrep transmission) ] && [[ $count -lt 60 ]]; do sleep 1; count=$(( count + 1 )); done
Dec 17, 2011
Please help me. It's a long time i'm studing this bug, but i have never found a solution. There is this random error when script edit the config file. How to reproduce: Remove Transmission & TorrentExpander Restart the unit. Install Transmission put setup.sh where you want and run many times: ./setup.sh install ./setup.sh uninstall After some times, you will see an empty config file with uncorrect permissions set. Example: http://pastebin.com/3EY5tPYV
Dec 17, 2011
(No comment was entered for this change.)
Status:
Accepted
Labels: -Priority-High Priority-Critical
Dec 17, 2011
Hi
What config file ends up empty ?
torrentexpander_settings.ini or settings.json ?
Maybe the cleanest and safest way is to preserve the user's settings.json file (i.e. cp settings.json settings.json.old) and revert on uninstall.
Also, editing a file using cat and sed may not be the best idea (if cat fails to open the file, you may replace it with a blank file).
Maybe this is safer
Install :
if [ ! -f /share/Apps/Transmission/config/settings.json.bak ]; then
cp /share/Apps/Transmission/config/settings.json /share/Apps/Transmission/config/settings.json.bak
fi
sed -i 's/^\( *\)\"script-torrent-done-enabled\"\: .*$/\1\"script-torrent-done-enabled\"\: true\,/g' /share/Apps/Transmission/config/settings.json
sed -i 's/^\( *\)\"script-torrent-done-filename\"\: .*$/\1\"script-torrent-done-filename\"\: \"\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh \$TR_TORRENT_DIR\/\$TR_TORRENT_NAME\"\,/g' /share/Apps/Transmission/config/settings.json
Uninstall :
if [ -f /share/Apps/Transmission/config/settings.json ] && [ -f /share/Apps/Transmission/config/settings.json.bak ]; then
rm /share/Apps/Transmission/config/settings.json && mv /share/Apps/Transmission/config/settings.json.bak /share/Apps/Transmission/config/settings.json
fi
Dec 17, 2011
Thanks, it seems to work. Next CSI version will have a 'nmj_update.sh' in bin folder, ready for Issue 13 in the future.
Dec 18, 2011
Hi I'm glad it works now I just committed a new SVN revision. You can add the following two lines to the torrentexpander_settings.ini file post_run_script_enabled=yes post_run_script=/share/Apps/TorrentExpander/bin/nmj_update.sh This is a very basic implementation for now until I find a way to polish it a bit. It can only fetch a binary or script's name in your PATH directory (and a few additional others) or run a script or binary from a specific path and run it. In the future, I'll need to compile a list of essential binaries and scripts users may want to run once torrentexpander is done and also find an smart way to pass variables.
Dec 18, 2011
Very Good. For the future, have a look to oversight sample script: # Scanning with Oversight cd /share/Apps/oversight/bin ./oversight.sh NEWSCAN "$TR_TORRENT_DIR"
Dec 18, 2011
released new csi version. I hope that cat command was the problem
Labels:
-Priority-Critical Priority-Low
Dec 18, 2011
(No comment was entered for this change.)
Status:
Fixed
Dec 23, 2011
Another problem: http://www.networkedmediatank.com/showthread.php?tid=56777&pid=529670#pid529670
Status:
Accepted
Labels: -Priority-Low Priority-Critical
Dec 23, 2011
Hi Can you please ask this user what his download path is. This will point us in the right direction Thanks
Dec 27, 2011
founded users problems: 1) debug log of torrentexpander says: ./setup.sh: line 17: [: too many arguments 2) Missing depandancies: opkg install commands fails!!
Dec 27, 2011
I don't see anything that could cause such an issue in line 17 of your setup script I'm not familiar with case/esac structure. If you need help rewriting the setup script, I could do it, but I would then use some more basic commands (i.e. replace case/esac with some if/fi routines and assign 2 values to $1 : install or uninstall) Thanks for finding the source of this issue, I would never have been able to track that down.
Dec 27, 2011
line 17: while [ $(pgrep -f php5server) ] && [[ $count -lt 60 ]]; do what happens if pgrep found more than one process? ;-) Is this the origin of error?
Dec 27, 2011
I must improve debug on setup.sh. Please complete this script using wget command only (because it must not depends to busybox) if [ "$(wget ???????????????? ) ]; then internet="yes" else internet="no" echo 'Warning: no internet connection' fi
Dec 28, 2011
if [ "$(echo "$(wget -q "http://sourceforge.net" -O - | grep -o "SourceForge.net"; wait)")" ]; then internet="yes" else internet="no" echo 'Warning: no internet connection' fi But you could also use these lines prior to installing every package if [ ! "$(opkg list-installed | grep "unzip")" ] && [ "$internet" == "yes" ]; then ... Afterwards, if [ ! "$(opkg list-installed | grep "unzip")" ] || [ ! "$(opkg list-installed | grep "unrar")" ] || [ ! "$(opkg list-installed | grep "wget")" ] || [ ! "$(opkg list-installed | grep "busybox")" ]; then... In this case, we can return an error message saying torrentexpander did not install correctly Regarding php5server, all processes should be killed by the previous command If not, we could force quit the process on timeout ?
Dec 28, 2011
Sorry, we can not use grep command in this debug lines, because it is a part of busybox package. No busybox --> no debug output. See 'ls -al /bin/' on nmt device for avaiable commands (excluding busybox entryes).
Dec 28, 2011
The main idea for now is about adding a new function on setup.sh, called 'presetup'. This function do some things: 1) Check if opkg is installed. 2) Check if there is an internet connection. 3) Install depandancies 4) Check if depandancies are installed. 5) Start setup if [4] are OK.
Dec 28, 2011
This is so frustrating All I could think of in order to detect internet connection are ping and wget. Both are linked to busybox if ! ping sourceforge.net -c 1 -w 5 > /dev/null 2>&1; then if ! wget -q "http://sourceforge.net" -O - --timeout 5 > /dev/null 2>&1; then In order to detect binaries, all I could think of was (and both find and which seem linked to busybox) if [ ! -x "$(which unrar)" ]; then if [ ! "$(find /bin /usr/bin /usr/local/bin -name "unrar")" ]; then I'm scratching my head thinking of other solutions, hoping I'll find some new ideas soon.
Dec 29, 2011
You should use wget! It's included in the firmware. Have a look: ls -al /bin/wget lrwxrwxrwx 1 root root 21 Jan 1 2000 /bin/wget -> /opt/syb/app/bin/wget If you need an idea, have a look to this: http://repository.nmtinstaller.com/appinit.cgi appinit_auto_upgrade() is a function that check for an internet connection.
Dec 29, 2011
Don't use which for setup script: ls -al /usr/bin/which lrwxrwxrwx 1 516 root 17 Jan 1 2000 /usr/bin/which -> ../../bin/busybox
Dec 29, 2011
I think this is the right way: wget -qO- http://repository.nmtinstaller.com/appinit_version
Dec 29, 2011
Updated setup.sh It works well for me.
Dec 29, 2011
New version is out. See forum for changes.
Labels:
-Priority-Critical Priority-Medium
Dec 29, 2011
Tried to revert my NMT C200 to its out of the box setup then installed this package. All dependencies have been installed correctly and everything seems to work fine. Let's cross our fingers hoping it works fine for all users. I'll now take care of issue 39
Jan 1, 2012
As i suspect.... We need to replace all binaries with their proper path, as you have written at comment 2. Look this output: the user has not correct $PATH, torrentexpander will never work without it. http://www.networkedmediatank.com/showthread.php?tid=56777&pid=531869#pid531869
Labels:
-Priority-Medium Priority-Critical
Jan 1, 2012
I started doing that until I realized that this is not the correct way to do it At the beginning of the script I would rely on some commands like find, ls and so on in order to guess the path to binaries. If those commands are not in $PATH either, then we're screwed The smart option would be to save the user's $PATH then edit it and do the same in your install script # SCRIPT START PATH_BACKUP="$PATH" for test_path in $(echo -e "/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/bin\n/bin\n/usr/sbin\n/sbin\n/usr/local/bin\n/usr/X11/bin\n/Applications\n/opt/syb/sigma/bdj/jvm/bin\n/usr/bin/X11\n/opt/syb/app/bin\n/opt/syb/app/sbin\n/opt/syb/sigma/bin\n/nmt/apps"); do if [[ -d "$test_path" && "$PATH" != *$test_path* ]]; then PATH="$PATH:$test_path"; fi; done export PATH="$PATH" ... ... ... export PATH="$PATH_BACKUP" # SCRIPT END WHat do you think of that ?
Jan 2, 2012
Looks good, but i have done dozen of times the command 'export PATH'. After restart, i have lost all changes.
Jan 2, 2012
That's why these lines have to be added to my script as well as your installer. The path variable will be replaced then restored everytime the script runs I'll commit a new SVN tonight with these lines as well as a few tweaks
Jan 2, 2012
Ok, but i think that it must exist a way to permanently edit $PATH.
Jan 2, 2012
Siriam says: " Probably he was using A110/100 which does not contain the above path default. It can be added in the start_app.sh "
Jan 2, 2012
In order to do that permanently, we'd need to edit each user's /etc/bashrc Doing changing a variable on every run is a better option
Jan 2, 2012
This feature has been added to the latest SVN build We'll see if it works well from user feedback
Jan 3, 2012
/etc/bashrc do not exist /root/.bashrc exist anyway nmt user do not have any .bashrc
Jan 3, 2012
TEST CODE: # Try to correct paths PATH_BACKUP="$PATH" for test_path in $(echo -e "/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/bin\n/bin\n/usr/sbin\n/sbin\n/usr/local/bin\n/usr/X11/bin\n/Applications\n/opt/syb/sigma/bdj/jvm/bin\n/usr/bin/X11\n/opt/syb/app/bin\n/opt/syb/app/sbin\n/opt/syb/sigma/bin\n/nmt/apps"); do if [[ -d "$test_path" && "$PATH" != *$test_path* ]]; then PATH="$PATH:$test_path"; STRING="Information: adding $test_path your paths list" echo $STRING fi done export PATH="$PATH"
Jan 3, 2012
But there is an error: i have run it many times, but it always say: Information: adding /nmt/apps your paths list echo $PATH /opt/syb/sigma/bdj/jvm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/opt/syb/app/bin:/opt/syb/app/sbin:/opt/syb/sigma/bin
Jan 3, 2012
Another try, i have set $PATH=/bin, then i have run the script. Information: adding /usr/local/bin to your paths list Information: adding /usr/sbin to your paths list Information: adding /usr/bin to your paths list Information: adding /opt/syb/sigma/bdj/jvm/bin to your paths list Information: adding /opt/syb/app/bin to your paths list Information: adding /opt/syb/app/sbin to your paths list Information: adding /opt/syb/sigma/bin to your paths list Information: adding /nmt/apps to your paths list but then... echo $PATH /bin
Jan 3, 2012
Give this one liner a try path_backup="$PATH"; PATH="/bin"; initial_path=":$PATH:"; new_path="$PATH"; for test_path in $(echo -e "/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/bin\n/bin\n/usr/sbin\n/sbin\n/usr/local/bin\n/usr/X11/bin\n/Applications\n/opt/syb/sigma/bdj/jvm/bin\n/usr/bin/X11\n/opt/syb/app/bin\n/opt/syb/app/sbin\n/opt/syb/sigma/bin\n/nmt/apps"); do if [[ -d "$test_path" && "$initial_path" != *:$test_path:* ]]; then new_path="$new_path:$test_path"; fi; done; PATH="$new_path"; echo -e "Here is your new PATH :\n$PATH"; PATH="$path_backup" It works on all my OS. The previous one did too, but this one is cleaner I'll add it to the build I'm gonna upload tonight Let me know how it works for you
Jan 3, 2012
Ok, this line works, but changes path only 'inside' the script. It does not change system path. Yes, we can use it anyway, but 'global' change would be better. SCRIPT LOG Information: adding /nmt/apps to your paths list Here is your new PATH : /opt/syb/sigma/bdj/jvm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/opt/syb/app/bin:/opt/syb/app/sbin:/opt/syb/sigma/bin:/nmt/apps SYSTEM OUTPUT (echo $PATH) /opt/syb/sigma/bdj/jvm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/opt/syb/app/bin:/opt/syb/app/sbin:/opt/syb/sigma/bin TESTED CODES # Try to correct paths path_backup="$PATH"; initial_path=":$PATH:"; new_path="$PATH"; for test_path in $(echo -e "/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/bin\n/bin\n/usr/sbin\n/sbin\n/usr/local/bin\n/usr/X11/bin\n/Applications\n/opt/syb/sigma/bdj/jvm/bin\n/usr/bin/X11\n/opt/syb/app/bin\n/opt/syb/app/sbin\n/opt/syb/sigma/bin\n/nmt/apps"); do if [[ -d "$test_path" && "$initial_path" != *:$test_path:* ]]; then STRING="Information: adding $test_path to your paths list" echo "$STRING"; new_path="$new_path:$test_path"; fi done PATH="$new_path"; echo -e "Here is your new PATH :\n$PATH"; export PATH="$PATH"
Jan 3, 2012
Once you export PATH="$new_path", then it is global until you export PATH="$path_backup" or reboot I think this is much better that way. I've added this line to torrentexpander. You should do the same with your install script Thanks for finding that out
Jan 4, 2012
So, this is the problem: 'export PATH' do not work on my device. In latest torrentexpander.sh you have not put ' PATH="$new_path"; ', i suspect that script do not work without it if 'export PATH' fails.
Jan 4, 2012
Stable-5 is out
Jan 4, 2012
I do not understand your comment 54 I notice in the last line of your comment 52 : export PATH="$PATH" The correct line is PATH="$new_path". You already made that change in the new installer. Everything seems fine Thanks
Jan 5, 2012
What steps will reproduce the problem? Run the setup.sh install What is the output? Information: this is your current paths list: /opt/syb/sigma/bdj/jvm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/opt/syb/app/bin:/opt/syb/app/sbin:/opt/syb/sigma/bin:/nmt/apps What do you see instead? When scripts ends, i type echo $PATH and i expect same output. I get old $PATH instead.
Jan 5, 2012
Take a look at the last lines of the script. There is a revert line on the initial $PATH value. And I really think we should keep it
Jan 5, 2012
Nice, but comment 57 refers to setup.sh only. I have disabled revert lines for this report.
Jan 6, 2012
I have no idea why this happens. It's probably linked to NMT CSI. Anyway, we don't want to fuck up the user's setup by adding exotic directories to the user's $PATH unless required
Jan 8, 2012
NEW CSi version soon.
Jan 9, 2012
I suggest you try this line this time sed -i 's/^\( *\)\"script-torrent-done-filename\"\: .*$/\1\"script-torrent-done-filename\"\: \"\/share\/Apps\/TorrentExpander\/bin\/torrentexpander.sh\"\,/g' /share/Apps/Transmission/config/settings.json Thanks
Jan 9, 2012
What should i write about these directive? all_files_script="incorrect_or_not_set" processed_torrent_script="incorrect_or_not_set" all_files_script_enabled="no" processed_torrent_script_enabled="no"
Jan 9, 2012
For now, I suggest you keep these lines as is
Jan 10, 2012
New csi version. I hope all problem is fixed.
Status:
Fixed
Jan 13, 2012
Oh, god. What's wrong now? http://www.networkedmediatank.com/showthread.php?tid=56777&pid=535240#pid535240
Status:
Accepted
Jan 13, 2012
Hi Based on his logs, the line that fails for this user is this one if [[ -d "$test_path" && "$initial_path" != *:$test_path:* ]]; then The line is correct and it shouldn't happen. I've experienced weird issues like that with my NMT. After a reboot, everything was running smoothly. I don't see any other explanation
Jan 14, 2012
found other problem: /usr/bin/unzip: invalid option -- 'j' I must force unzip_bin="/usr/local/bin/unzip" on settings file.
Jan 14, 2012
This is a problem beacuse nmt-a100 series do not have unzip-opkg package (/usr/local/bin/unzip), but have only unzip bin (/usr/bin/unzip) from busybox.
Jan 14, 2012
Hi In the latest SVN, I've prioritized the /usr/local/bin/ path when torrentexpander searches for unzip, unrar and so on. As it appears, it does not solve our problem. Are you sure there is no way to get on the NMT-A110 a version of Unzip that supports the -j argument ? I can't deal with junk paths without major rewrites (and I have no idea how to deal with that) Thanks
Jan 15, 2012
We have to wait for Siriam release of unzip. I have already asked for it.
Status:
Fixed
Jan 24, 2012
On A100 series do not work. This is output when run manually: /bin/sh: ./torrentexpander.sh: not found same with absolute path
Status:
Accepted
Jan 24, 2012
From debeli75's logs, we now know : The /share/Apps/Transmission directory exists, so the /share/Apps/ directory does exist The TorrentExpander.tar was unpacked ; if not, the installer wouldn't have started We don't have logs in the install routine but my guess is simply that the TorrentExpander.tar archive was expanded in an unknown directory. If I look into the appinit.cgi, NMTAPPS_LOCATION is set to /mnt/syb8634 I trust Teunis and I'm sure he knows his stuff. But are we sure unrar is available in this path ? /mnt/syb8634/bin/unrar We may need to ask a A100 series owner to try this command : find / -name torrentexpander.sh If we don't get any result, we'll probably need to add some debug to the install routine in the installer. This is really getting complicated
Jan 25, 2012
This is my output /opt/sybhttpd/localhost.drives/HARD_DISK # find / -name torrentexpander.sh /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpande r.sh /opt/sybhttpd/localhost.drives/HARD_DISK #
Jan 25, 2012
Thanks for getting us on the right track Can you see a TorrentExpander directory in the /share/Apps/ directory ? Can you see a settings.json file in this directory : /share/Apps/Transmission/config/ Can you confirm where Transmission downloads its files ? - /share/Download/ - /share/Downloads/ - /opt/sybhttpd/localhost.drives/HARD_DISK/Download/ or - /opt/sybhttpd/localhost.drives/HARD_DISK/Downloads/ Can you send us the results of all of these lines : which unrar which unzip which wget which basename which cat which chmod which chown which date which dirname which du which echo which egrep which expr which find which grep which id which ls which mkdir which mv which rm which sed which touch which vi which wc With those informations we may be able to build a new installer that works on A1XX series Thanks
Jan 25, 2012
Here You are...
Can you see a TorrentExpander directory in the /share/Apps/ directory ?
- Yes
Can you see a settings.json file in this directory :
/share/Apps/Transmission/config/
- Yes, and inside is
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/share/Apps/TorrentExpander/bin/torrentexpander.sh",
Can you confirm where Transmission downloads its files ?
- /share/Download
/opt/sybhttpd/localhost.drives/HARD_DISK # which unrar
/usr/local/bin/unrar
/opt/sybhttpd/localhost.drives/HARD_DISK # which unzip
/usr/bin/unzip
/opt/sybhttpd/localhost.drives/HARD_DISK # which wget
/bin/wget
/opt/sybhttpd/localhost.drives/HARD_DISK # which basename
/usr/bin/basename
/opt/sybhttpd/localhost.drives/HARD_DISK # which cat
/bin/cat
/opt/sybhttpd/localhost.drives/HARD_DISK # which chmod
/bin/chmod
/opt/sybhttpd/localhost.drives/HARD_DISK # which chown
/bin/chown
/opt/sybhttpd/localhost.drives/HARD_DISK # which date
/bin/date
/opt/sybhttpd/localhost.drives/HARD_DISK # which dirname
/usr/bin/dirname
/opt/sybhttpd/localhost.drives/HARD_DISK # which du
/usr/bin/du
/opt/sybhttpd/localhost.drives/HARD_DISK # which echo
/bin/echo
/opt/sybhttpd/localhost.drives/HARD_DISK # which egrep
/bin/egrep
/opt/sybhttpd/localhost.drives/HARD_DISK # which expr
/usr/bin/expr
/opt/sybhttpd/localhost.drives/HARD_DISK # which find
/usr/bin/find
/opt/sybhttpd/localhost.drives/HARD_DISK # which grep
/bin/grep
/opt/sybhttpd/localhost.drives/HARD_DISK # which id
/usr/bin/id
/opt/sybhttpd/localhost.drives/HARD_DISK # which ls
/bin/ls
/opt/sybhttpd/localhost.drives/HARD_DISK # which mkdir
/bin/mkdir
/opt/sybhttpd/localhost.drives/HARD_DISK # which mv
/bin/mv
/opt/sybhttpd/localhost.drives/HARD_DISK # which rm
/bin/rm
/opt/sybhttpd/localhost.drives/HARD_DISK # which sed
/bin/sed
/opt/sybhttpd/localhost.drives/HARD_DISK # which touch
/bin/touch
/opt/sybhttpd/localhost.drives/HARD_DISK # which vi
/bin/vi
/opt/sybhttpd/localhost.drives/HARD_DISK # which wc
/usr/bin/wc
Jan 25, 2012
Thanks Debeli75 We now know everything we need to build a test installer with a custom settings file and a different sed command to edit Transmission json file. Out of curiosity, can you try to run torrentexpander manually with this command : /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh if not, try this, then try again the previous command : chmod +x /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh Does it spit out any error ? If you select a torrent to process and a directory where to expand it, does it work correctly ? Thanks
Jan 26, 2012
Here is output /opt/sybhttpd/localhost.drives/HARD_DISK # /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh /bin/sh: /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh: not found /opt/sybhttpd/localhost.drives/HARD_DISK # chmod +x /opt/sybhttpd/localhost.driv es/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh /opt/sybhttpd/localhost.drives/HARD_DISK # /opt/sybhttpd/localhost.drives/HARD_D ISK/Apps/TorrentExpander/bin/torrentexpander.sh /bin/sh: /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torre ntexpander.sh: not found /opt/sybhttpd/localhost.drives/HARD_DISK # /share/Apps/TorrentExpander/bin/torre ntexpander.sh /share/Download/natures.weirdest.events.s01e02.720p.hdtv.x264-ftp /bin/sh: /share/Apps/TorrentExpander/bin/torrentexpander.sh: not found /opt/sybhttpd/localhost.drives/HARD_DISK #
Jan 26, 2012
This is getting weirder by the minute. Actually this is driving me nuts ! According to the find command, the file is in one place, according to shell, it isn't ! Is there any chance your hard drive got disconnected or non responsive during the install and/or when you used the command /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh ? Can you see script content when you use either of these two commands ? vi /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh vi /share/Apps/TorrentExpander/bin/torrentexpander.sh Now I'm out of ideas. Would it be possible for me to get access to your NMT for an hour or so this week-end ? Thanks
Jan 26, 2012
as i remember, when i have got access to his nmt, program worked. Another user (nmt a100) has reported to me same problem.
Jan 26, 2012
I now what you mean... I see script when I connect from my windows xp, I am connecting to popcorn as a network drive with standard user name and password but somehow popcorn cant find that script. Maybe one thing... When I install torrentexpander from CSI, and I tray it maybe 20-30 times, most of the time it takes few hours, like 5-6 hours to CSI to finish installation, dont now why Is there any chance your hard drive got disconnected or non responsive during the install and/or when you used the command /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh - I got response immediately to command Can you see script content when you use either of these two commands ? vi /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh vi /share/Apps/TorrentExpander/bin/torrentexpander.sh - I can see content with both commands Now I'm out of ideas. Would it be possible for me to get access to your NMT for an hour or so this week-end ? - No problem, just tell me how on my mail
Jan 26, 2012
Debeli75 Regarding the delay while installing torrentexpander, it looks like php5server took a long while to quit, according to your logs, but that's all we know for now I've done some research and it seems to be a permission issue. Not specifically to the script but to one of the directories above. Can you use the following command to know what user you're currently logged in as : id I think I may have some time on saturday. I'll send you a mail asking you for access to your NMT on saturday between 10AM and 4PM CET Thanks
Jan 28, 2012
Thanks to Debeli75's help we now know what happened bash is not available on the NMT 100 series (A110 actually) opkg update opkg install bash Package bash fails because it wants wants to install file /share/Apps/local/share/info/dir, already installed by wget opkg remove wget opkg install bash wget cannot install after bash for the same reason /usr/local/bin/bash /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh works /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh doesn't With 100 series, we may need to change transmission settings line to : "script-torrent-done-filename": "/usr/local/bin/bash /share/Apps/TorrentExpander/bin/torrentexpander.sh", We need a workaround for wget in order to make it play nice with bash package
Jan 28, 2012
Fine, you must force bash install, we have to change setup.sh please do a uname -a on nmt A100, we have to parse this information.
Jan 28, 2012
Let's simply reuse this from appinit.cgi #SET C200 or A/B variables echo -n "Found hardware type: " if [ -e "/nmt/apps" ]; then echo "Popcorn Hour C200" ... else echo "Syabas A/B type" ... fi
Jan 28, 2012
Ah ok.
Jan 29, 2012
Here is 2 day after Toitoinou aka Addictedtoscreens work on my a-110 report: - there is nothing in my Expanded folder - no error file in TorrentExpander/bin folder - when manually start torrentexpander got this: /opt/sybhttpd/localhost.drives/HARD_DISK # /usr/local/bin/bash /opt/sybhttpd/loc alhost.drives/HARD_DISK/Apps/TorrentExpander/bin/torrentexpander.sh /share/Downl oad/Man.Woman.Wild.S02E11.Croatian.Cave.Odyssey.720p.HDTV.x264-MOMENTUM ---------------------------------------------------- ---------------------------------------------------- WELCOME TO TORRENTEXPANDER ---------------------------------------------------- ---------------------------------------------------- Select Destination Folder : / 0 - Select current folder 1 - .. 2 - USB_DRIVE_A-1 3 - bin 4 - dev 5 - etc 6 - home 7 - init 8 - lib 9 - linuxrc 10 - mnt 11 - modules 12 - opt 13 - proc 14 - root 15 - sbin 16 - share 17 - share_thumbnails 18 - sys 19 - tmp 20 - upnp 21 - usr 22 - var Type the ID of the Destination Folder :
Jan 30, 2012
When running torrentexpander manually, everything runs the way it should. It seems that using /usr/local/bin/bash in transmission does not work. It may be because transmission is run by the nmt user. I was worried about that, I must admit. Right now I'm out of ideas I'll need to do some research. Loginbug, any idea ? Thanks
Jan 30, 2012
I don't know, and i'm really busy this week.
Feb 2, 2012
latest setup file
Feb 2, 2012
Stable-8 is out, i have not updated svn files.
Feb 2, 2012
Nice job Unfortunately, transmission does not seem to be able to trigger torrentexpander.sh on 100 series. I have browsed many forums but all the scripts I found for 100 series were shell scripts. We're almost there...
Feb 2, 2012
oh god
Dec 2, 2012
Sorry, but I cannot investigate this issue I'm closing it. C100 has been EOL for some time now
Status:
WontFix
|