1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/misc/py-glance/files/glance-registry.in
Martin Wilke 599f96436c - Update to 16.0.1
- Changed MASTER_SITES to the official upstream repository
- Added LICENSE_FILE
- Enabled building for Python 3+ ports
- Removed RC script glance-glare because it's no longer required
- Sorted variables a bit according to the PHB
- Added OPTIONS for DOCS, MySQL, PostgreSQL, memcached and MongoDB
- Added post-extract, post-patch and post-install targets to replace hardcoded
  occurences of /etc with ${PREFIX}/etc and to handle the installation of files into ${ETCDIR}
- Added pkg-message

PR:		232244
Submitted by:	freebsd_ports@k-worx.org
Approved by:	maintainer
Sponsored by:	iXsystems Inc.
2019-01-29 14:03:30 +00:00

56 lines
1.2 KiB
Bash

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