contrib/mailman-web/mailman-web-0.0.5-fhs.patch

52 lines
1.7 KiB
Diff

diff -ruN a/mailman_web/manage.py b/mailman_web/manage.py
--- a/mailman_web/manage.py 2022-08-12 22:05:01.562363167 +0200
+++ b/mailman_web/manage.py 2022-08-12 22:05:18.955599046 +0200
@@ -11,7 +11,7 @@
MAILMAN_WEB_CONFIG = os.getenv(
'MAILMAN_WEB_CONFIG',
- '/etc/mailman3/settings.py',
+ '/etc/webapps/mailman-web/settings.py',
)
if not os.path.exists(MAILMAN_WEB_CONFIG):
diff -ruN a/mailman_web/settings/base.py b/mailman_web/settings/base.py
--- a/mailman_web/settings/base.py 2022-08-12 22:05:01.562363167 +0200
+++ b/mailman_web/settings/base.py 2022-08-12 22:08:27.497875716 +0200
@@ -4,7 +4,7 @@
from pathlib import Path
#: The base directory for logs and database.
-BASE_DIR = Path('/opt/mailman/web')
+BASE_DIR = Path('/var/lib/mailman-web')
#: Default list of admins who receive the emails from error logging.
ADMINS = (
@@ -137,7 +137,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'mailman-web.db'),
+ 'NAME': BASE_DIR / 'data' / 'mailman-web.db',
'HOST': '',
'PORT': '',
}
@@ -181,7 +181,7 @@
#: Default path where static files will be placed.
-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
+STATIC_ROOT = BASE_DIR / 'static'
#: URL prefix for static files.
#: Example: "http://example.com/static/", "http://static.example.com/"
@@ -251,7 +251,7 @@
'file': {
'level': 'INFO',
'class': 'logging.handlers.WatchedFileHandler',
- 'filename': os.path.join(BASE_DIR, 'logs', 'mailmanweb.log'),
+ 'filename': Path('/var/log/mailman-web/mailman-web.log'),
'formatter': 'verbose',
},
'console': {