Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Question about package installation via curl

Avatar

Level 1

Hi folks, I may have a special challenge regarding the installation of packages via curl command in AEM 6.5 (on prem). There are many posts related to "how to curl", but none fitting to this problem.

 

We use this shell commands in a script for uploading - and in an later step - installing packages.

 

curl -u $user:$pwd -F package=@"/${package_name}" -F force=true http://$host:$port/crx/packmgr/service/.json/?cmd=upload 

 

curl -u $user:$pwd -X POST http://$host:$port/crx/packmgr/service/.json/etc/packages/xxx/<package_name>?cmd=install --progress-bar

 

This works smooth as butter so far. 

 

But recently we are working on a new site and the new created package from our development is like a main-package.

By this I mean, we can upload and install this package in the packet-manager via curl, but when I look at the result afterwards, there are 5 more sub-packages, that are NOT installed automatically. These "new" packages have always to be installed manually.

 

When we upload and install the "main"-package directly in the packet-manager GUI, everything works fine. The sub-packages get unpacked and automatically installed.

Is there a special curl method / parameter to get these unpacked sub-packages also directly installed?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Can you try with

curl -u admin:admin -F cmd=install http://localhost:4502/crx/packmgr/service/.json/etc/packages/xxx/<package_name>.zip

Try to add additional parameters if above does not work

 

cmd: install
recursive: true

 

 



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Dennis_The_Menace ,

The only listed CURL commands are in Adobe docs. I think these are the only CURL commands which can be used in the AEM package manager. 

https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lan...

Thanks

Avatar

Correct answer by
Community Advisor

Can you try with

curl -u admin:admin -F cmd=install http://localhost:4502/crx/packmgr/service/.json/etc/packages/xxx/<package_name>.zip

Try to add additional parameters if above does not work

 

cmd: install
recursive: true

 

 



Arun Patidar

Avatar

Community Advisor

check this document that will help you in building the curl command for whatever operation you do in aem

https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/curl.html?lan...

Avatar

Level 1

Thank you all for your suggestion. I tried every single on but had no luck :-/
Maybe it is something special within the package itself ...