summaryrefslogtreecommitdiff
path: root/dev-util/gitlab-runner/files/gitlab-runner-18.initd
blob: 13b1cb2c3703bda83fe156a1b3b675e8594610c2 (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
#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

command="/usr/bin/gitlab-runner"
command_args="run
	--config /etc/gitlab-runner/config.toml
	--working-directory /var/lib/gitlab-runner
	--user gitlab-runner
	--syslog
	${RUNNER_OPTS}"
command_background=true
extra_started_commands="reload"
name="GitLab Runner"
pidfile="/run/${RC_SVCNAME}.pid"
retry="QUIT/60/TERM/60"
required_files="${runner_config}"

depend() {
	need localmount
	after net.lo loopback
}

reload() {
	ebegin "Reloading ${name} configuration"
	start-stop-daemon --signal HUP --pidfile "${pidfile}"
	eend $? "Failed to reload ${NAME} configuration"
}