1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
6 Description=Arvados Docker Image Cleaner
7 Documentation=https://doc.arvados.org/
9 #AssertPathExists=/etc/arvados/docker-cleaner/docker-cleaner.json
11 # systemd==229 (ubuntu:xenial) obeys StartLimitInterval in the [Unit] section
14 # systemd>=230 (debian:9) obeys StartLimitIntervalSec in the [Unit] section
15 StartLimitIntervalSec=0
21 RestartPreventExitStatus=2
23 # This unwieldy ExecStart command detects at runtime whether
24 # arvados-docker-cleaner is installed with the Python 3.3 Software
25 # Collection, and if so, invokes it with the "scl" wrapper.
26 ExecStart=/bin/sh -c 'if [ -e /opt/rh/rh-python35/root/bin/arvados-docker-cleaner ]; then exec scl enable rh-python35 arvados-docker-cleaner; else exec arvados-docker-cleaner; fi'
28 # systemd<=219 (centos:7, debian:8, ubuntu:trusty) obeys StartLimitInterval in the [Service] section
32 WantedBy=multi-user.target