RE: Go go shell command

Jamie Sammons, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

Need to wite custom go go shell command in the portal-ext.properties file and that custom command has to work without restarting server?

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

I'm not sure what you're trying, but you're on the wrong path. portal-ext.properties is not a script file, an it's only evaluated upon startup.

Syed Arif, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

i requirment is  how to create custom gogo shell command and that command has to reload and start without restarting the server.

thumbnail
Mohammed Yasin, modified 4 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts

Hi,

If your looking to create custom gogo shell command then below reference may help you

https://help.liferay.com/hc/en-us/articles/360017891852-Gogo-Shell-Command#how-does-this-sample-leverage-the-apis-andor-code-component

https://github.com/liferay/liferay-blade-samples/tree/7.3/gradle/extensions/gogo

Syed Arif, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

Hi thank you for your Answer.

But my requirment is that when ever i create custom gogo shell command and when i excecute that command in the gogo shell and the portal-ext.propeties which i have added property it has to reload without restarting  server?

thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts

I am not sure what you are trying to achieve here since your description does not add up. But if you want to implement a custom gogo shell command, you can check e.g. this blog post:

https://www.marconapolitano.it/en/liferay/86-how-to-implement-a-custom-gogo-shell-command-for-liferay-7.html

Syed Arif, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

like i want to create custom gogo shell command and if i ececute that command the value has to reload from the porta-ext.properties file without restarting server.

Syed Arif, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

the link which u have shared it is to get all the comapies ids but my requirment is to 

like i want to create custom gogo shell command and if i ececute that command the value has to reload from the porta-ext.properties file without restarting server.

Syed Arif, modified 4 Years ago. New Member Posts: 8 Join Date: 10/22/20 Recent Posts

once we run gogo shell command, portal-ext.properties should reload with updated value

thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts

Ah, we are getting closer to your problem.

Since this forum does not support answering to your posts, let me quote them here:

"the link which u have shared it is to get all the comapies ids but my requirment ... "

Well, this was an example of a gogo shell command to get you started. You will need to implement your command with your logic yourself.

 

Now, I think this is the issue you want to solve:

"once we run gogo shell command, portal-ext.properties should reload with updated value"

I don't think this can be solved in a general way. Lots of modules pick up fields from the property file and at least some of them don't support "reloading". It simply isn't doable.

But it could be solvable for your specific usecase. Which property do you want to reload? Maybe there is a solution for your specific problem.