#!/bin/sh
# Run from a root shell or root's BusyBox crontab on Alpine Linux.
set -eu
export STATE_DIRECTORY=/var/lib/data-shield-relay
exec /sbin/su-exec data-shield-relay:nginx /usr/bin/timeout 300 \
    /usr/bin/python3 -IB /usr/local/lib/data-shield-relay/refresh.py \
    --credential-stdin < /etc/data-shield-relay/device
