[main]
@type = classic
@version = 0.0.1
@description = "runit"
@user = (root)

[start]
@build = custom
@shebang = "/bin/sh"
@execute = (
exec 2>&1

PATH=/usr/bin:/usr/sbin
runlevel=66

runsvchdir "${runlevel}"
s6-mkdir -v -p /run/runit/runsvdir
ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
s6-rmrf /var/service/current
s6-rmrf /var/service/supervise

exec s6-env -i PATH=$PATH \
    runsvdir -P /run/runit/runsvdir/current
 )

[stop]
@build = custom
@shebang = "/bin/sh -c"
@execute = (
    sv force-stop /var/service/* &&
    sv exit /var/service/* )

[logger]
@backup = 3
@maxsize = 1000000