➕ replace tomlib with tomlkit
tomlkit can read and write toml files
This commit is contained in:
parent
19603d6d9f
commit
e8503bd073
8 changed files with 145 additions and 156 deletions
24
README.md
24
README.md
|
@ -14,7 +14,7 @@ pipx install --include-deps --index-url https://git.propeace.de/api/packages/Pro
|
|||
Create a new configuration file:
|
||||
|
||||
```bash
|
||||
adgroupsync --create-config --conf /path/to/adgroupsync_config.yaml
|
||||
adgroupsync --create-config --conf /path/to/adgroupsync_config.toml
|
||||
```
|
||||
|
||||
Edit the configuration file and set the following values:
|
||||
|
@ -22,37 +22,39 @@ Edit the configuration file and set the following values:
|
|||
### AD Configuration
|
||||
|
||||
- `AD.DOMAIN`: The domain of the Active Directory server.
|
||||
- `AD.USER`: The username of the user to connect to the Active Directory server.
|
||||
- `AD.PASSWORD`: The password of the user to connect to the Active Directory
|
||||
server.
|
||||
- `AD.LDAP_SERVER`: The LDAP server of the Active Directory server.
|
||||
- `AD.LDAP_SERVER`: List of LDAP servers to connect to.
|
||||
- `AD.PARENT_GROUP`: The parent group in Active Directory that contains all
|
||||
groups that should be synchronized.
|
||||
- `AD.TIMEZONE`: The timezone of the Active Directory server.
|
||||
- `AD.USER`: The username of the user to connect to the Active Directory server.
|
||||
- `AD.PASSWORD`: The password of the user to connect to the Active Directory
|
||||
server.
|
||||
|
||||
### Civicrm Configuration
|
||||
|
||||
- `CIVICRM.BASE_URL`: The URL of the CiviCRM server.
|
||||
- `CIVICRM.API_KEY`: The API key of the CiviCRM user.
|
||||
- `CIVICRM.BASE_URL`: The URL of the CiviCRM server.
|
||||
- `CIVICRM.BATCH_SIZE`: The batch size for the API requests to the CiviCRM
|
||||
server (only applied to contact sync). _DEFAULT: 50_
|
||||
- `CIVICRM.RETRIES`: The number of retries for the API requests to the CiviCRM
|
||||
server. _DEFAULT: 3_
|
||||
- `CIVICRM.IGNORE_SSL`: Allow insecure connections to the CiviCRM server.
|
||||
_DEFAULT: False_
|
||||
|
||||
### Logging Configuration
|
||||
|
||||
- `LOGGING.STDOUT_LOG_LEVEL`: The log level for the stdout logger. _DEFAULT:
|
||||
INFO_
|
||||
- `LOGGING.FILE_LOG_LEVEL`: The log level for the file logger. _DEFAULT: INFO_
|
||||
- `LOGGING.LOG_DIR`: The path to the log file. _DEFAULT:
|
||||
/var/log/adgroupsync.log_
|
||||
- `LOGGING.LOG_DIR`: The directory to store the log file. _DEFAULT:
|
||||
`/var/log/adGroupSync/`
|
||||
|
||||
### NTFY (optional)
|
||||
|
||||
If you want to send notifications about failed syncs, you can
|
||||
configure [ntfy](https://ntfy.sh/).
|
||||
|
||||
- `NTFY.URL`: The URL of the NTFY server.
|
||||
- `NTFY.URL`: The URL of the ntfy server.
|
||||
- `NTFY.TOPIC`: The topic to post the message to.
|
||||
- `NTFY.ACCESS_TOKEN`: The access token for the NTFY server.
|
||||
|
||||
|
@ -61,7 +63,7 @@ configure [ntfy](https://ntfy.sh/).
|
|||
### Manual Sync
|
||||
|
||||
```bash
|
||||
adgroupsync --conf /path/to/adgroupsync_config.yaml
|
||||
adgroupsync --conf /path/to/adgroupsync_config.toml
|
||||
```
|
||||
|
||||
### Cron Job
|
||||
|
@ -69,5 +71,5 @@ adgroupsync --conf /path/to/adgroupsync_config.yaml
|
|||
Synchronize the groups every 10 minutes:
|
||||
|
||||
```bash
|
||||
*/10 * * * * adgroupsync --conf /path/to/adgroupsync_config.yaml 2>&1
|
||||
*/10 * * * * adgroupsync --conf /path/to/adgroupsync_config.toml > /dev/null 2>&1
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue