Question about package installation via curl | Community
Skip to main content
Dennis_The_Menace
New Participant
Mar 8, 2023 11:10 AM UTC
Solved

Question about package installation via curl

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 8, 2023 3:10 PM UTC

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

4 replies

Dennis_The_Menace
New Participant
Mar 9, 2023 4:28 PM UTC
Thank you all for your suggestion. I tried every single on but had no luck :-/ Maybe it is something special within the package itself ...
Translate
DPrakashRaj
New Participant
Mar 8, 2023 9:16 PM UTC

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?lang=en

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 8, 2023 3:10 PM UTC

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

 

 

Translate
Arun Patidar
Prince_Shivhare
New Participant
Mar 8, 2023 11:35 AM UTC

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?lang=en

Thanks

Translate