#!/sbin/openrc-run

: ${command_user:="zot:zot"}
: ${cfgfile:="/etc/zot/config.json"}

name=zot
description="OCI-native container image registry"
command="/usr/bin/zot"
command_args="serve $cfgfile"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"

required_files="$cfgfile"

depend() {
	need net localmount
	after firewall
}

start_pre() {
	$command verify "$cfgfile"
}
