#!/bin/bash
# Wachtor wie beim Backup-Dienst. Zusaetzlich: dieser Dienst braucht S3, also
# auch die Instanzkonfiguration -- ohne sie weiss er nicht, aus welchem Speicher
# die Wurzel-CRL kommt.
exec 2>&1

TICK_CONF=/etc/tick/puppet-vm.conf
TICK_WAIT=30
[ -r /etc/default/root-crl-sync ] && . /etc/default/root-crl-sync

if [ ! -r "${TICK_CONF}" ]; then
  echo "root-crl-sync: ${TICK_CONF} fehlt -- warte ${TICK_WAIT}s (schreibt der Bootstrap)"
  sleep "${TICK_WAIT}"
  exit 1
fi

exec run-script-daemon root-crl-sync
