Created
March 18, 2021 05:52
-
-
Save bodsch/5f4e2d22fa4d5cd3f82406e782ec5585 to your computer and use it in GitHub Desktop.
openrc script for influxdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/openrc-run | |
# Copyright 1999-2016 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
set -x | |
error_log=/var/log/influxdb/influxd.log | |
output_log=/dev/null | |
config=/etc/influxdb/influxdb.conf | |
influxd_opts= | |
command=/usr/bin/influxd | |
command_args='-config /etc/influxdb/influxdb.conf ' | |
command_user=influxdb:influxdb | |
extra_commands=version | |
pidfile=/run/influxdb.pid | |
retry=SIGTERM/30/SIGKILL/10 | |
supervisor=supervise-daemon | |
depend() { | |
use logger | |
need net | |
} | |
start() { | |
ebegin 'Starting influxdb' | |
. /etc/conf.d/influxdb | |
start-stop-daemon \ | |
--start \ | |
--verbose \ | |
--background \ | |
--user influxdb \ | |
--wait 320 \ | |
--make-pidfile \ | |
--pidfile ${pidfile} \ | |
--exec ${command} run -- \ | |
--bolt-path /srv/influxdb/influxd.bolt \ | |
--engine-path /srv/influxdb/engine \ | |
--reporting-disabled \ | |
--log-level info | |
eend $? "Failed to start influxdb" | |
} | |
stop() { | |
ebegin "Stopping influxdb" | |
start-stop-daemon --stop \ | |
--pidfile "${pidfile}" | |
eend $? "Failed to stop influxdb" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment