Merge branch '10468-blob-storage-timeouts' closes #10468
[arvados.git] / services / dockercleaner / arvados-docker-cleaner.service
index 416ea4422caa3d241b0618e66b2a841186a6fd66..031058242a21179f15a0ef36ce9456f657811338 100644 (file)
@@ -10,10 +10,10 @@ Restart=always
 RestartSec=10s
 RestartPreventExitStatus=2
 #
-# If your deployment uses a Python 3 Software Collection, uncomment the
-# ExecStart line below, and delete the following one:
-#ExecStart=/usr/bin/env scl enable python33 arvados-docker-cleaner
-ExecStart=/usr/bin/env arvados-docker-cleaner
+# This unwieldy ExecStart command detects at runtime whether
+# arvados-docker-cleaner is installed with the Python 3.3 Software
+# Collection, and if so, invokes it with the "scl" wrapper.
+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'
 
 [Install]
 WantedBy=multi-user.target