#!/sbin/openrc-run # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 output_log="${output_log:-/dev/null}" error_log="${error_log:-${INFLUXDB_LOGDIR}/error.log}" name="${name:-InfluxDB daemon}" command="/usr/bin/influxd" command_args="-config ${INFLUXDB_CONFIG}" command_user="${command_user:-influxdb:influxdb}" command_background=yes pidfile="/run/${RC_SVCNAME}.pid" required_files="${INFLUXDB_CONFIG}" start_stop_daemon_args="${SSD_OPTS} -1 ${output_log} -2 ${error_log}" depend() { need net after bootmisc } start_pre() { checkpath -f -m 0600 -o "${command_user}" "${INFLUXDB_CONFIG}" checkpath -d -m 0750 -o "${command_user}" \ "${INFLUXDB_LOGDIR}" "${INFLUXDB_DATADIR}" }