Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145910956
D13581.id42879.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D13581.id42879.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -1,13 +1,14 @@
-# Created by: Dave Cottlehuber <dch@skunkwerks.at>
+# Created by: Dave Cottlehuber <dch@FreeBSD.org>
# $FreeBSD$
PORTNAME= graphite-api
PORTVERSION= 1.1.3
+PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-MAINTAINER= dch@skunkwerks.at
+MAINTAINER= dch@FreeBSD.org
COMMENT= Graphite-web, without the interface - just the rendering HTTP API
LICENSE= APACHE20
@@ -24,15 +25,17 @@
${PYTHON_PKGNAMEPREFIX}gunicorn>=19.4.1:www/py-gunicorn@${FLAVOR} \
xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype
-NO_ARCH= yes
USES= python
-USE_PYTHON= distutils py3kplist
+USE_PYTHON= distutils py3kplist concurrent
+NO_ARCH= yes
+
GRAPHITEAPI_APP= graphiteapi
SUB_FILES= pkg-message
SUB_LIST= PORTNAME=${PORTNAME} \
PREFIX=${PREFIX} \
+ PYTHON_VERSION=${PYTHON_VERSION} \
GRAPHITEAPI_APP=${GRAPHITEAPI_APP} \
GRAPHITEAPI_USER=${GRAPHITEAPI_USER} \
GRAPHITEAPI_GROUP=${GRAPHITEAPI_GROUP} \
Index: files/graphiteapi.in
===================================================================
--- files/graphiteapi.in
+++ files/graphiteapi.in
@@ -23,8 +23,10 @@
name="%%GRAPHITEAPI_APP%%"
rcvar="%%GRAPHITEAPI_APP%%_enable"
+desc="graphite-web rendering API"
-# defaults
+load_rc_config ${name}
+
: ${graphiteapi_enable:="NO"}
: ${graphiteapi_user="%%GRAPHITEAPI_USER%%"}
: ${graphiteapi_group="%%GRAPHITEAPI_GROUP%%"}
@@ -32,21 +34,32 @@
: ${graphiteapi_config="%%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml"}
: ${graphiteapi_flags="--workers 4"}
-# daemon
-command="%%PREFIX%%/bin/gunicorn"
required_files="${graphiteapi_config}"
-command_args="graphite_api.app:app"
+
+command="%%PREFIX%%/bin/gunicorn-%%PYTHON_VERSION%%"
+procname="%%PYTHON_VERSION%%"
+
+pidfile="%%GRAPHITEAPI_PIDFILE%%"
+
+command_args="--daemon graphite_api.app:app"
command_args="${command_args} --user ${graphiteapi_user} --group ${graphiteapi_group}"
command_args="${command_args} --bind ${graphiteapi_address}"
-command_args="${command_args} --env TZ=UTC"
command_args="${command_args} --env GRAPHITE_API_CONFIG=${graphiteapi_config}"
command_args="${command_args} --pid %%GRAPHITEAPI_PIDFILE%%"
command_args="${command_args} --worker-tmp-dir %%GRAPHITEAPI_TMPDIR%%"
command_args="${command_args} --error-logfile %%GRAPHITEAPI_LOGDIR%%/error.log"
command_args="${command_args} --access-logfile %%GRAPHITEAPI_LOGDIR%%/access.log"
-# support SIGHUP to reload configuration file
extra_commands="reload"
+start_precmd="start_precmd"
-load_rc_config $name
+start_precmd()
+{
+ test -d "%%GRAPHITEAPI_LOGDIR%%" || install -d -o
+ ${graphiteapi_user} \
+ -g ${graphiteapi_group} -m 0750 "%%GRAPHITEAPI_LOGDIR%%"
+ test -d "%%GRAPHITEAPI_TMPDIR%%" || install -d -o ${graphiteapi_user} \
+ -g ${graphiteapi_group} -m 0750 "%%GRAPHITEAPI_TMPDIR%%"
+}
+
run_rc_command "$1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 2:10 AM (9 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29010667
Default Alt Text
D13581.id42879.diff (2 KB)
Attached To
Mode
D13581: www/py-graphite-api: clean up rc.d script - fix ordering in rc.d script - ensure rc.d script returns on startup - ensure working directories are re-created on startup if required submitted by Horst Kapfenberger via BZ223264 https://bugs.freebsd.
Attached
Detach File
Event Timeline
Log In to Comment