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

How to invoke a dispatcher script from AEM Author

Avatar

Avatar
Level 1
amrithanivas
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
amrithanivas
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
amrithanivas
Level 1

07-06-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

07-06-2021

@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. 

Answers (2)

Answers (2)

Avatar

Avatar
Boost 1
Level 1
mayank_saklech1
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
mayank_saklech1
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
mayank_saklech1
Level 1

07-06-2021

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). 

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-06-2021

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