[Unit] Description=cleanup tasks for the matrix synapse service After=matrix-synapse.service BindsTo=matrix-synapse.service Requisite=matrix-synapse.service # Please create a token file ConditionPathExists=/etc/matrix-synapse/cleanup.token [Service] Type=simple LoadCredential=token_header:/etc/matrix-synapse/cleanup.token ExecStart=/usr/bin/run-parts --verbose --arg=%d/token_header --arg=http://127.0.0.1:8008/_synapse/admin/ -- /etc/matrix-synapse/cleanup.d # Matrix user isn't needed for the current scripts # User=matrix-synapse # Group=matrix-synapse DynamicUser=yes ProtectSystem=strict ConfigurationDirectory=matrix-synapse/cleanup.d