summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/influxdb/files/influxdb.init.d')
-rwxr-xr-xdev-db/influxdb/files/influxdb.init.d31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-db/influxdb/files/influxdb.init.d b/dev-db/influxdb/files/influxdb.init.d
new file mode 100755
index 0000000..c98c7b0
--- /dev/null
+++ b/dev-db/influxdb/files/influxdb.init.d
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting influxdb server"
+
+ start-stop-daemon --start -b \
+ --user influxdb:influxdb \
+ --pidfile /run/influxdb.pid \
+ --make-pidfile \
+ --stdout /var/log/influxdb/influxd.log \
+ --stderr /var/log/influxdb/influxd.log \
+ --exec /usr/bin/influxd -- -config /etc/influxdb/influxdb.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping influxdb server"
+
+ start-stop-daemon --stop \
+ --pidfile /run/influxdb.pid \
+ --exec /usr/bin/influxd
+ eend $?
+}