Add systemd service/timer files

This commit is contained in:
Adam Goldsmith 2023-01-05 21:51:55 -05:00
parent 8897651285
commit f87cfbb435
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,13 @@
[Unit]
Description=Synchronize Mailman lists to CMSManage API
[Service]
User=mailman
Group=mailman
Type=oneshot
TimeoutStartSec=600
EnvironmentFile=/opt/mailman-sync/env
ExecStart=/usr/bin/python3.9 /opt/mailman-sync/mailman_sync.py \
--bin /usr/local/cpanel/3rdparty/mailman/bin/ \
--api https://paperwork.claremontmakerspace.org/api/v1/paperwork/certification_definition/mailing_lists.json \
--list-suffix _claremontmakerspace.org

View File

@ -0,0 +1,9 @@
[Unit]
Description=Periodically synchronize Mailman lists to CMSManage API
[Timer]
OnCalendar=hourly
Persistent=true
[Install]
WantedBy=timers.target