Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to invoke a dispatcher script from AEM Author

amrithanivas
Level 1
Level 1

Hi Community,

 

  I am trying to invoke an sh script that's present in my dispatcher via AEM author. Is this achievable? Are there any customization guide or tools that I can follow to achieve this?

 

Thanks

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@amrithanivas ,

You can try,
With an Apache Web Server, You can write a CGI script to intercept your web requests, next from the CGI script, you can call the .sh file. 

I don't think there are too many guides out there because this solution seems a bit out of the norm. 

View solution in original post

3 Replies
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@amrithanivas ,

You can try,
With an Apache Web Server, You can write a CGI script to intercept your web requests, next from the CGI script, you can call the .sh file. 

I don't think there are too many guides out there because this solution seems a bit out of the norm. 

View solution in original post

Arun_Patidar
Community Advisor
Community Advisor

hey, at which event you want to call that script? manually or on publish event?

mayank_saklech1
Level 2
Level 2

I am assuming you have more than one dispatcher instances and that you will want to invoke shell script on all those dispatcher instances. One of ways is to write a shell script on your author server. That shell script will in turn ssh into all the dispatcher instances and execute the script, you may maintain list of dispatcher instances in that shell script. From AEM author instance, you will be left with invoking a shell script on same server which is an easier task.

Reason i mentioned involving one more script in between your author and dispatcher server is that you will not have to rely on 3rd party libraries for doing remote script execution (using ssh).