Start/shutdown script?

Hello,

I got a problem with Openfire that in case of a openfire-shutdown all running conversation get no leftDate in the table ofconparticipant.

But I need this for proper running of my script ( http://www.igniterealtime.org/community/message/182073#182073)

To avoid this problem, I would like to run a script at shutdown, that fill all NULL values with actual timestamps.

( And one at startup, if a unplanned shutdown/ crash occures )

Is this somehow possible?

Thanks in advance,

Maddi

Hi Maddi,

It’s probably possible but it would take some work and experimentation. Could you create cron job that is continually checking to see if Openfire is running and as soon as it detects that it isn’t update the necessary table? Or somehow modify the Openfire startup script to do the necessary updates after the shutdown command has been issued?

Another option would be to write a plugin that uses the XMPPServerListener which could detect when the server is shutting down and do the necessary updates prior to shutdown.

Hope that helps,

Ryan