I have a hook where to add an organization and few custom field variables (Expando Variables) automatically to a liferay portal. How do I run that hook or a method in the hook during liferay setup or the first time I start a liferay portal? Does anyone have any links or codes for this?
Thanks
To reiterate your requirement you need to do some custom actions when Liferay server is started, so from what I understand you need a startup custom action hook.
This is nothing but a simple hook where you would override some porperties from portal.properties
and provide a custom action class like MyCustomStartupAction
or MyCustomGlobalAction
in that property and implement it.
In the user-guide here is a list of some properties you can configure: Startup Events
This SO Answer gives more information about creating a hook with such properties.