#! /bin/sh
set -xeuf

PATH="$(dirname $(readlink -f "$0"))${PATH+:$PATH}"

if args="`pgrep-retiolum-tincd-args`"; then
  while $args --kill; do
    sleep 1
  done
  $args
else
  echo "$0: there is no retiolum tincd process to restart" >&2
  exit 23
fi