summaryrefslogtreecommitdiff
blob: c65ef84120aab249f3534c11f1dfa6b83cbfd6b0 (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
#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

description="Starts ${SVCNAME} service for OpenStack"

command=/usr/bin/${SVCNAME}
command_background=yes
command_args="--config-file /etc/cinder/cinder.conf --log-file /var/log/cinder/${SVCNAME}.log"
pidfile=/var/run/cinder/${SVCNAME}.pid
required_files=/etc/cinder/cinder.conf

start_stop_daemon_args="--quiet --user ${CINDER_USER:-cinder}"

depend() {
	need net
}

start_pre() {
	checkpath --directory --owner ${CINDER_USER:-cinder}:${CINDER_GROUP:-cinder} --mode 0755 ${CINDER_RUN:-/var/run/cinder}
  checkpath --directory --owner ${CINDER_USER:-cinder}:${CINDER_GROUP:-cinder} --mode 0755 ${CINDER_LOCK:-/var/lock/cinder}
}