#!/bin/bash

LOGDIR="/var/log/runit/ark-container-renew"
NAME="container-renew"

# Based on the logscript autogenerated by dh_runit
mkdir -p "$LOGDIR"
chown _runit-log:adm "$LOGDIR"
chmod 750 "$LOGDIR"

# But send logs to both stdout and svlogd
tee >(chpst -u _runit-log svlogd -tt "$LOGDIR") | sed -u "s/^/$NAME: /"
