Changeset - bdac443c16db
[Not reviewed]
3 0 4
Brett Smith (brett) - 20 months ago 2019-11-23 23:20:09
brett@sfconservancy.org
systemd: Replace cron infrastructure.
6 files changed with 57 insertions and 21 deletions:
0 comments (0 inline, 0 general)
cron/cron.d/website-update
Show inline comments
 
deleted file
cron/cron.monthly/django-cleanup
Show inline comments
 
deleted file
systemd/conservancy-www-cleanup.service
Show inline comments
 
new file 100644
 
[Unit]
 
Description=Cleanup Conservancy website
 
Before=apache2.service
 

	
 
[Service]
 
Type=oneshot
 
User=www
 
ExecStart=/usr/bin/python /var/www/website/www/manage.py clearsessions --verbosity 0
 

	
 
SystemCallFilter=~@clock @cpu-emulation @debug @module @mount @obsolete
 
CapabilityBoundingSet=
 
NoNewPrivileges=true
 

	
 
PrivateDevices=true
 
PrivateNetwork=true
 
PrivateTmp=true
 
PrivateUsers=true
 
ProtectControlGroups=true
 
ProtectHome=true
 
ProtectKernelModules=true
 
ProtectKernelTunables=true
 
ProtectSystem=strict
 
ReadWritePaths=/var/lib/www/database
 

	
 
[Install]
 
WantedBy=apache2.service
systemd/conservancy-www-update.service
Show inline comments
 
new file 100644
 
[Unit]
 
Description=Update Conservancy website checkout
 

	
 
[Service]
 
Type=oneshot
 
User=www
 
WorkingDirectory=/var/www/website
 
ExecStart=/var/www/website/systemd/conservancy-www-update.sh
 

	
 
SystemCallFilter=~@clock @cpu-emulation @debug @module @mount @obsolete
 
CapabilityBoundingSet=
 
NoNewPrivileges=true
 

	
 
PrivateDevices=true
 
PrivateNetwork=false
 
PrivateTmp=true
 
PrivateUsers=false
 
ProtectControlGroups=true
 
ProtectHome=true
 
ProtectKernelModules=true
 
ProtectKernelTunables=true
 
ProtectSystem=strict
 
ReadWritePaths=/var/www/website
systemd/conservancy-www-update.sh
Show inline comments
 
file renamed from cron/scripts/website-update.sh to systemd/conservancy-www-update.sh
systemd/conservancy-www-update.timer
Show inline comments
 
new file 100644
 
[Unit]
 
Description=Update Conservancy website checkout
 

	
 
[Timer]
 
OnCalendar=*:0/5
 

	
 
[Install]
 
WantedBy=timers.target
0 comments (0 inline, 0 general)