summaryrefslogtreecommitdiff
path: root/dev-util/drone/files/drone-server.initd
blob: 4294ef9b74dc884f57c21fb4d2e155d06c010ba5 (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
#!/sbin/openrc-run
# Copyright 2016-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="Drone CI"
pidfile=${pidfile:-"/run/${RC_SVCNAME}/${RC_SVCNAME}.pid"}
user=${user:-drone}
group=${group:-drone}

command="/usr/bin/drone-server"
command_background="true"
command_args="-env-file /etc/${RC_SVCNAME}.conf"
start_stop_daemon_args="
	--user ${user}
	--group ${group}
	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
	"

start_pre() {
	[ -e /etc/${RC_SVCNAME}.conf ] && return
	eerror "You need to create /etc/${RC_SVCNAME}.conf"
	eerror "See http://docs.drone.io/server/reference/ for information."
	return 1
}