Add systemd service/timer files
This commit is contained in:
parent
8897651285
commit
f87cfbb435
13
systemd/mailman_sync.service
Normal file
13
systemd/mailman_sync.service
Normal 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
|
9
systemd/mailman_sync.timer
Normal file
9
systemd/mailman_sync.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Periodically synchronize Mailman lists to CMSManage API
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=hourly
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user