8 lines
871 B
SYSTEMD
8 lines
871 B
SYSTEMD
|
[Service]
|
||
|
WorkingDirectory=/usr/share/mailman3-web
|
||
|
ExecStartPre=/usr/bin/python3 manage.py migrate
|
||
|
ExecStartPre=/usr/bin/python3 manage.py shell -c 'from django.contrib.sites.models import Site; site=Site.objects.first(); site.name="%%{revprox_client_external_domainnames[0]}"; site.domain="%%{revprox_client_external_domainnames[0]}"; site.save()'
|
||
|
ExecStartPre=/usr/bin/python3 manage.py shell -c 'from allauth.socialaccount.models import SocialApp; SocialApp.objects.create() if SocialApp.objects.count() == 0 else print("social app already exists"); a=SocialApp.objects.first(); a.name = "%%domain_name_eth0"; a.provider = "risotto"; a.client_id = "%%oauth2_client_id"; a.secret = "%%oauth2_client_secret"; a.sites.set([1]); a.save()'
|
||
|
ExecStartPre=-/usr/bin/python3 manage.py createsuperuser --username "%%mailman_mail_owner" --email "%%mailman_mail_owner" --noinput
|
||
|
|