diff --git a/bin/deploy/systemd/conservancy-www-cleanup.service b/bin/deploy/systemd/conservancy-www-cleanup.service new file mode 100644 index 0000000000000000000000000000000000000000..5ad0a5603c7c6dff0048466c6a893d7de64bbd88 --- /dev/null +++ b/bin/deploy/systemd/conservancy-www-cleanup.service @@ -0,0 +1,28 @@ +# Remove old Django login sessions. + +[Unit] +Description=Cleanup Conservancy website +Before=apache2.service + +[Service] +Type=oneshot +User=www-data +ExecStart=/usr/bin/python3 /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