JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 21.10.2018, 04:25
kkkira kkkira is offline
JD Fan
 
Join Date: Aug 2009
Posts: 70
Default jd2 run shell script after finished download started by packagizer

Hello,

i want to run a shell script (linux) after a package finish to download, a package that is started by a packagizer rule. Is it possible?
Reply With Quote
  #2  
Old 21.10.2018, 07:32
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Use same conditions in the script to identify the package, before running the shell script (using callSync() or callAsync() method).
Reply With Quote
  #3  
Old 22.10.2018, 01:43
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

from what I understand you can not tell a package to call a script from package customiser, but you could use event scripter to look for something unique like comment you set via package customiser rule.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #4  
Old 23.10.2018, 18:43
kkkira kkkira is offline
JD Fan
 
Join Date: Aug 2009
Posts: 70
Default

Quote:
Originally Posted by raztoki View Post
from what I understand you can not tell a package to call a script from package customiser, but you could use event scripter to look for something unique like comment you set via package customiser rule.
This seems possible, but i've never done an event script before... i'll dig around to try to do it...
Reply With Quote
  #5  
Old 23.10.2018, 18:57
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

callSync() and callAsync() are both eventscripter methods which can be used to execute your shell script:

Example code to be used in in eventscripter to run shell script:
Code:
callSync("/path/to/my/script.sh");

Before running the script, you can use the same conditions (which you have used in packagizer) in the eventscripter script, to ascertain if the package was started by packagizer rule and the run the script if it matches the condition.

If you need further help on this, you can also contact me in JD Chat.
Reply With Quote
  #6  
Old 24.10.2018, 21:09
kkkira kkkira is offline
JD Fan
 
Join Date: Aug 2009
Posts: 70
Default

Quote:
Originally Posted by mgpai View Post
callSync() and callAsync() are both eventscripter methods which can be used to execute your shell script:

Example code to be used in in eventscripter to run shell script:
Code:
callSync("/path/to/my/script.sh");

Before running the script, you can use the same conditions (which you have used in packagizer) in the eventscripter script, to ascertain if the package was started by packagizer rule and the run the script if it matches the condition.

If you need further help on this, you can also contact me in JD Chat.
I do need help, I'll contact you. Thanks.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:08.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.