2411: Add copyright notices to everything.
[arvados.git] / services / dockercleaner / arvados-docker-cleaner.service
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 [Unit]
6 Description=Arvados Docker Image Cleaner
7 Documentation=https://doc.arvados.org/
8 After=network.target
9 AssertPathExists=/etc/arvados/docker-cleaner/docker-cleaner.json
10 # systemd<230
11 StartLimitInterval=0
12 # systemd>=230
13 StartLimitIntervalSec=0
14
15 [Service]
16 Type=simple
17 Restart=always
18 RestartSec=10s
19 RestartPreventExitStatus=2
20 #
21 # This unwieldy ExecStart command detects at runtime whether
22 # arvados-docker-cleaner is installed with the Python 3.3 Software
23 # Collection, and if so, invokes it with the "scl" wrapper.
24 ExecStart=/bin/sh -c 'if [ -e /opt/rh/python33/root/bin/arvados-docker-cleaner ]; then exec scl enable python33 arvados-docker-cleaner; else exec arvados-docker-cleaner; fi'
25
26 [Install]
27 WantedBy=multi-user.target