Execute script or command at login

Hi,

is there a way to execute a script or a command at user login?

Kind regards

Hasse Nielsen

Client or Server?

Message was edited by: SlowIce

  • on the server side.

I want to get Openfire to open a program and parse the user id as an input.

…like “wget www.test.dk?id=johndoe” or “signup.sh johndoe”.

This will allow me to make a response when a user logs in.

/Hasse

I have not tried this, but it should work:

Write a plugin that implements the SessionEventListener interface. Then use Session.getAddress() to identify users JID. Notice that multiple sessions are created per user, if he connects with multiple resources.

For performance you should implement your “response” directly in the plugin and not use command shell.