From 16c89ef3c41ed57bcd6a97256f68ddac194217be Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Fri, 14 May 2021 12:02:46 +0200 Subject: [PATCH] Add info about emails into README https://github.com/YunoHost-Apps/pyinventory_ynh/issues/53 works out of the box ;) --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e9e616..e772306 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,35 @@ Pull requests welcome ;) ## Settings and upgrades Almost everything related to PyInventory's configuration is handled in a `"../conf/settings.py"` file. -You can edit the file `$final_path/local_settings.py` to enable or disable features. +You can edit the file `/opt/yunohost/pyinventory/local_settings.py` to enable or disable features. + +Test sending emails: + +```bash +ssh admin@yourdomain.tld +root@yunohost:~# cd /opt/yunohost/pyinventory/ +root@yunohost:/opt/yunohost/pyinventory# source venv/bin/activate +(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py sendtestemail --admins +``` + +Background info: Error mails are send to all [settings.ADMINS](https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-ADMINS). By default the YunoHost admin is inserted here. +To check current ADMINS run: + +```bash +(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py sendtestemail --admins +``` + +If you prefere to send error emails to a extrnal email address, just do something like this: + +```bash +echo "ADMINS = (('Your Name', 'example@domain.tld'),)" >> /opt/yunohost/pyinventory/local_settings.py +``` + +To check the effective settings, run this: +```bash +(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py diffsettings +``` + # Miscellaneous