[opencms-dev] OpenCMS Shell script?

Brabenetz, Harald harald.brabenetz at bearingpointconsulting.com
Tue May 31 20:39:02 CEST 2011


Maybe:

The shell-Script
--------------------------------------
....do somthing bevor
echo 'Execute cmsshell'
bash cmsshell.sh -script=MyCmsShellScript.txt
....do something after
--------------------------------------

MyCmsShellScript.txt:
-------------------------------
login "Admin" "admin"
setSiteRoot "/sites/default/"
deleteModule "%MODULE_NAME%"
importModuleFromDefault "%MODULE_ZIP%"
replaceModuleFromDefault "%MODULE_NAME%" "%MODULE_ZIP%"
-------------------------------

If you search for new, deleted and changed modules automatically you must generated the "MyCmsShellScript.txt".

hope it helps,
Harald


-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Daniel Cassiani Rezende
Sent: Dienstag, 31. Mai 2011 18:26
To: opencms-dev at opencms.org
Subject: [opencms-dev] OpenCMS Shell script?

Hi, folks,


I was researching about a way to create a scheduled deploy of a new module (in a linux), and I found out about OpenCMS Shell.

My goal is to create a robot application that, let's say at 1:00 AM, do the following routine:

1- search for new modules in a pre-set DEVelopment machine's folder;
2- if a new module is found, copy the module.zip in a PRODuction's machine pre-set folder (WEB-INF\packages\modules is fine by me);
3- run the OpenCMS Shell in PROD;
4- delete the old module;
5- import the new module;
6- since I have OCEE, replicate the module across the cluster's slaves;
7- leave the OpenCMS Shell;
8- restart JBoss;
9- clean our PROXY's cache (that's kinda ready already; it supports single line command from a linux prompt);
10- run an application that warns me by e-mail and sms that a module was found and deployed (also, ready as well).

However, I'm having trouble about how to put steps 3 to 7 in a linux script...

Any ideas about how to automate a chain of commands in OpenCms Shell?


Thanks,


Daniel Cassiani Rezende
________________________________
 INFONOVA GmbH
Sitz: Unterpremstätten bei Graz
Firmenbuchgericht: Landesgericht für ZRS Graz
Firmenbuchnummer: FN 44354b


The information in this email is confidential and may be legally privileged. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.


More information about the opencms-dev mailing list