Skip to content
Snippets Groups Projects
Commit c97d6cdf authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Clarify retention script

parent af21ad95
Branches
No related tags found
No related merge requests found
......@@ -64,10 +64,9 @@ To make the server reachable from the outside a reverse proxy (like NGINX) needs
You may be required by law to delete data after a certain period of time. To do so a a data retention script can be found in `stechuhr_server/retention.py`.
To run it once execute it with the python in your `env` directory like this (make sure to set the right config path, retention duration in days is read from there):
To run it once execute it with the python in your `env` directory like this (make sure to set the right config path, retention duration in days is read from there. You can display the used paths and the resulting config by running `stechuhr_server/config.py test`):
```bash
export STECHUHR-SERVER_CONFIG_PATH=/etc/stechuhr-server/config.toml
/path/to/my/install/stechuhr-server/env/bin/python stechuhr_server/retention.py
```
......@@ -75,7 +74,6 @@ To add it as a cron job just create a script at `/etc/cron.daily/stechuhr_data_r
```bash
#! /bin/bash
export STECHUHR-SERVER_CONFIG_PATH=/etc/stechuhr-server/config.toml
/path/to/my/install/stechuhr-server/env/bin/python stechuhr_server/retention.py
```
......@@ -93,7 +91,7 @@ Stechuhr-Server allows you to use _multiple_ configuration files, each overridin
Stechuhr-server will use _all_ *.toml files found in the specified directories in alphabetical order (e.g. `/etc/stechuhr-server`, for more see the config script below)
To maintain control a helper script exists at `stechuhr_server/config.py` which allows you to create a new config, print the currently used ones, etc. If your system python has the `toml` dependency installed run it using `python3 stechuhr_server/config.py` and it will display the help. If you _don't_ have the toml dependency installed you can:
To maintain control a helper script exists at `stechuhr_server/config.py` which allows you to create a new config, print the currently used ones, etc. If your system python has the `toml` dependency installed run it using `python3 stechuhr_server/config.py` or `poetry run config`and it will display the help. If you _don't_ have the toml dependency installed you can:
1. Install it
2. Use the python in env (see installation above): `path/to/env/bin/python stechuhr_server/config.py`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment