Using Configuration Files for Console Commands#
Please create a complete backup before making any changes to an interface/import. If the result is not satisfying, it can then be restored
If you use a configuration file, you can specify the options for the console command directly.
You can then save these newly created files under /i-doit/src/handler/config/ for example.
Access to .ini files
If the configuration file is placed in the i-doit directory, the .htaccess must be modified. This code should be added:
1 2 3 4 |
|
This saves you from typing the password in plain text. into the console.
The Console Command uses .ini files.
The Controller Command uses .inc.php files. However, this method is outdated and should not be used.
The configuration file is used with --config /path/to/config.ini or with -c /path/to/config.ini
The structure of the .ini#
1 |
|
Currently none available.
1 2 3 4 |
|
Here you can add the options of the Console Command. These options must be written in the “long form”.
For more options see Optionen und Parameter der Console.
1 |
|
Special parameters are entered below.
At the moment these are available for the ldapServerId and for import-syslog.
Example for the command search-index#
First the .ini file has to be created.
We use here additionally update to overwrite and create the search index.
Additionally we use quiet to shorten the output and save some memory, which can be used for indexing.
1 2 3 4 5 6 7 8 |
|
To use the configuration we execute the console command and specify the path to the configuration file with --config or -c.
1 |
|
## Example for the command notifications-send
There are no further options for this command so we only need the following options user, password.
1 2 3 4 5 6 |
|
To use the configuration file we execute the console command and specify the path to the configuration file with --config or short with -c.
1 |
|
example-notifications-send.ini
Example for the command ldap-sync#
This command offers the following additional options: ldapServerId and dumpConfig.
The ldapServerId option specifies the ldap server to use. Here the ID of the entry must be specified.
With dumpConfig no synchronization is executed! Only the configuration is output. Should therefore only be used for debugging.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
To use the configuration file we execute the console command and specify the path to the configuration file with --config or short with -c.
1 |
|
List of command options and a short explanation
Key | Value | Description |
---|---|---|
import_rooms= | true or false | Imports the LDAP attribute physicalDeliveryOfficeName and creates it as room, without location, if not available |
defaultCompany=\ | Name of Organisation | Default Organization to be entered, leave empty if nothing should be changed |
deletedUsersBehaviour= | archive, delete or disable_login | Behavior for deleted LDAP users. Should these be archived, deleted or the login deactivated |
disabledUsersBehaviour= | archive, delete or disable_login | Behavior for disabled LDAP users. Should these be archived, deleted or the login deactivated |
rooms[]="" | [“Room 01”]=“userPrincipalName” | Here your room is statically assigned to an LDAP user |
attributes[]= | attributes[i-doit field]=AD Attribute | Possible i-doit fields: academic_degree, function, service_designation, street, city, zip_code, phone_company, phone_home, phone_mobile, fax, pager, personnel_number, department, company, office, ldap_id, ldap_dn, description. If user-defined information is to be stored here, the Category extension can be activated. Then the fields: custom_1 - custom_8 are available |
autoReactivateUsers= | true or false | All users are automatically set to normal status before they are synced. This function is only necessary for OpenLDAP and NDS, because it is always enabled in the Active Directory |
ignoreUsersWithAttributes[]= | ignoreUsersWithAttributes[]=“sn” | Disables the synchronization of users where e.g. the sn(Last Name) in AD is empty. Several AD attributes can be used here, see example |
ignoreFunction= | empty*, !empty, isset*, !isset | The check function for “ignoreUsersWithAttributes”. If the value is set to “empty”, the function checks if the specified “ignoreUsersWithAttributes” value is empty. If this is the case the user will not be synchronized. |
*empty - Checks if a variable contains a value
*isset - Checks if a variable exists and if it is not NULL
Example for the command import-syslog#
There are no further options for this command so we only need the following options user, password und tenantId.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|