freebsd-ports/databases/opentsdb/files/opentsdb.in
Mark Felder 106bed3d77 OpenTSDB is a distributed, scalable Time Series Database (TSDB) written
on top of HBase.  OpenTSDB was written to address a common need: store,
index and serve metrics collected from computer systems (network gear,
operating systems, applications) at a large scale, and make this data
easily accessible and graphable.

WWW: http://www.opentsdb.net

Differential Revision:	https://reviews.freebsd.org/D4083
2015-11-06 14:30:04 +00:00

31 lines
703 B
Bash

#!/bin/sh -
# Copyright (c) 2015 Johannes Meixner
# PROVIDE: opentsdb
# REQUIRE: LOGIN
# KEYWORD: shutdown
# opentsdb_enable (bool): Set to NO by default.
# Set it to YES to enable OpenTSDB
. /etc/rc.subr
export PATH=${PATH}:%%PREFIX%%/bin
name=opentsdb
rcvar=opentsdb_enable
load_rc_config "${name}"
: ${opentsdb_enable:=NO}
: ${opentsdb_user:=opentsdb}
: ${opentsdb_opts:=tsd 2> %%OPENTSDB_LOGDIR%%/error.log 1> %%OPENTSDB_LOGDIR%%/tsdb.log}
pidfile="%%OPENTSDB_RUNDIR%%/${name}.pid"
opentsdb_daemon="%%PREFIX%%/bin/tsdb"
procname="daemon*"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} ${opentsdb_daemon} ${opentsdb_opts}"
run_rc_command "$1"