Merge branch '11065-rotate-logs'
[arvados.git] / services / dockercleaner / arvados-docker-cleaner.service
1 [Unit]
2 Description=Arvados Docker Image Cleaner
3 Documentation=https://doc.arvados.org/
4 After=network.target
5 AssertPathExists=/etc/arvados/docker-cleaner/docker-cleaner.json
6 # systemd<230
7 StartLimitInterval=0
8 # systemd>=230
9 StartLimitIntervalSec=0
10
11 [Service]
12 Type=simple
13 Restart=always
14 RestartSec=10s
15 RestartPreventExitStatus=2
16 #
17 # This unwieldy ExecStart command detects at runtime whether
18 # arvados-docker-cleaner is installed with the Python 3.3 Software
19 # Collection, and if so, invokes it with the "scl" wrapper.
20 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'
21
22 [Install]
23 WantedBy=multi-user.target