8.6.3. Script Handler Module

The script event handler module is used to trigger external scripts in case of certain events.

This way you can even add external actions to your workflows. You could trigger a database dump, an external printing device, a backup and much more.

8.6.3.1. Possible Actions

The actions of the script event handler are the scripts located in a certain script directory. The default script directory is /etc/edumfa/scripts.

You can change the location of the script directory and give the new directory in the parameter EDUMFA_SCRIPT_HANDLER_DIRECTORY in your edumfa.cfg file.

8.6.3.2. Possible Options

Options can be passed to the script. Your script has to take care of the parsing of these parameters.

8.6.3.2.1. logged_in_role

Add the role of the logged in user. This can be either admin or user. If there is no logged in user, none will be passed.

The script will be called with the parameter:

--logged_in_role <role>

8.6.3.2.2. logged_in_user

Add the logged in user. If there is no logged in user, none will be passed.

The script will be called with the parameter:

--logged_in_user <username>@<realm>

8.6.3.2.3. realm

Add --realm <realm> as script parameter. If no realm is given, none will be passed.

8.6.3.2.4. serial

Add --serial <serial number> as script parameter. If no serial number is given, none will be passed.

8.6.3.2.5. sync_to_database

Finish current transaction before running the script. This is useful if changes to the database should be made available to the script or the running request.

8.6.3.2.6. user

Add --serial <username>' as script parameter. If no username is given, none will be passed.

Note

A possible script you could call is the edumfa-get-unused-tokens.