#!/bin/sh -eux sv=${PWD%/log} sv=${sv#/etc/sv/} eval home="~log-$sv" cd "$home" exec chpst -u log-"$sv":log-"$sv" \ svlogd -v -tt "$home"