dataset/seed/mailman/templates/mailman3-web.service

8 lines
1 KiB
SYSTEMD
Raw Normal View History

2023-02-14 14:27:17 +01:00
[Service]
WorkingDirectory=/usr/share/mailman3-web
ExecStartPre=/usr/bin/python3 manage.py migrate
2023-06-23 08:12:05 +02:00
ExecStartPre=/usr/bin/python3 manage.py shell -c 'from django.contrib.sites.models import Site; site=Site.objects.first(); site.name="{{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }}"; site.domain="{{ general.revprox.revprox_client.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 = "{{ general.network.interface_0.domain_name_eth0 }}"; a.provider = "risotto"; a.client_id = "{{ general.oauth2_client.oauth2_client_id }}"; a.secret = "{{ general.oauth2_client.oauth2_client_secret }}"; a.sites.set([1]); a.save()'
ExecStartPre=-/usr/bin/python3 manage.py createsuperuser --username "{{ general.mailman.mailman_mail_owner }}" --email "{{ general.mailman.mailman_mail_owner }}" --noinput
2023-02-14 14:27:17 +01:00