#!/sbin/openrc-run

supervisor=supervise-daemon

description="GitLab CI Runner"
name="Gitlab Runner"

command="/usr/bin/gitlab-runner"
command_args="run ${GITLAB_RUNNER_OPTS}"
command_user="${GITLAB_RUNNER_USER}:${GITLAB_RUNNER_GROUP}"

error_log="/var/log/gitlab-runner.log"

depend() {
	need net
}

start_pre() {
	checkpath -f -m 644 -o "${GITLAB_RUNNER_USER}:${GITLAB_RUNNER_GROUP}" \
		"$error_log"
}
