ports/misc/py-cinder/files/cinder-scheduler.in
Martin Wilke 070a6ba29d - Update to 12.0.4
- Added LICENSE_FILE
- Changed MASTER_SITES to official OpenStack repository
- Removed EXTRA_PATCHES (those patches have been rebased and were converted into
  mandatory patches)
- Enabled building for Python 3+ versions
- Sorted variables according to the PHB
- Changed RC scripts to work with different Python versions
- Added CONFLICTS_INSTALL
- Added OPTIONS for MySQL, PostgreSQL, memcached and MongoDB support
- changed post-patch target to prevent the installation to files into ${ETCDIR}
  by distutils and to replace occurences of /etc to ${PREFIX}/etc
- Changed post-install target to install the files into ${ETCDIR}
- Updated the shipped cinder.conf.sample
- Updated pkg-message

PR:		232245
Submitted by:	freebsd_ports@k-worx.org
Approved by:	maintainer
Sponsored by:	iXsystems Inc.
2019-01-29 14:05:58 +00:00

53 lines
1.1 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: cinder_scheduler
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable cinder_scheduler:
#
# cinder_scheduler_enable="YES"
#
# cinder_scheduler_enable (bool):
# Set it to "YES" to enable cinder_scheduler.
# Default is "NO".
#
# cinder_scheduler_logdir (str):
# Set it to chagge log directory
# Default is "/var/log/cinder"
#
# cinder_scheduler_args (str):
# Set it to change command line arguments.
# Default is "--log-file ${cinder_scheduler_logdir}/cinder-scheduler.log"
#
. /etc/rc.subr
name=cinder_scheduler
rcvar=cinder_scheduler_enable
PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
pidfile="/var/run/cinder-scheduler.pid"
procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
start_precmd=cinder_precmd
load_rc_config $name
: ${cinder_scheduler_enable:="NO"}
: ${cinder_scheduler_logdir:="/var/log/cinder"}
: ${cinder_scheduler_args:="--log-file ${cinder_scheduler_logdir}/cinder-scheduler.log"}
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} cinder-scheduler ${cinder_scheduler_args}"
cinder_precmd() {
mkdir -p ${cinder_scheduler_logdir}
}
run_rc_command "$1"