mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-20 17:38:11 -07:00
Closes: https://bugs.gentoo.org/836305 Closes: https://github.com/gentoo/gentoo/pull/24795 Thanks-to: Henning Schild <henning@hennsch.de> Signed-off-by: William Hubbs <williamh@gentoo.org>
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 1999-2022 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
command="/usr/bin/gitlab-runner"
|
|
runner_datadir="${runner_datadir:-/var/lib/gitlab-runner}"
|
|
command_args="run
|
|
--config ${runner_config:-/etc/gitlab-runner/config.toml}
|
|
--service ${runner_service:-${RC_SVCNAME}}
|
|
--user ${runner_user:-gitlab-runner}
|
|
--working-directory ${runner_datadir}
|
|
${RUNNER_OPTS}"
|
|
command_background=true
|
|
extra_started_commands="reload"
|
|
name="${name:-GitLab Runner}"
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
runner_user="${runner_user:-gitlab-runner}"
|
|
runner_logdir="${runner_logdir:-/var/log/gitlab-runner}"
|
|
output_log="${output_log:-${runner_logdir}/gitlab-runner.log}"
|
|
error_log="${error_log:-${runner_logdir}/gitlab-runner.err}"
|
|
retry="QUIT/60/TERM/60"
|
|
required_files="${runner_config}"
|
|
|
|
depend() {
|
|
need localmount
|
|
after net.lo loopback
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -m 0700 -o "${runner_user}" "${runner_datadir}"
|
|
checkpath -d -m 0750 -o "${runner_user}" "${runner_logdir}"
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading ${name} configuration"
|
|
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
|
eend $? "Failed to reload ${name}"
|
|
}
|