blob: 0e5c5ed224b64aec3e864916293a497815fa6a2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/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}"
}
|