From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 14CD3138359 for ; Wed, 15 Jul 2020 21:33:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41299E0887; Wed, 15 Jul 2020 21:33:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26888E0887 for ; Wed, 15 Jul 2020 21:33:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0BAD334F17F for ; Wed, 15 Jul 2020 21:33:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 33C2A2DD for ; Wed, 15 Jul 2020 21:33:43 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1594848646.4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/influxdb/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/influxdb/files/influxdb.rc-r1 X-VCS-Directories: dev-db/influxdb/files/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe X-VCS-Branch: master Date: Wed, 15 Jul 2020 21:33:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d8046a4b-588c-45a1-865b-a7858cbc9b15 X-Archives-Hash: aa714d72384cb356c72a4abb52a7c619 commit: 4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe Author: Robin H. Johnson gentoo org> AuthorDate: Wed Jul 15 21:02:50 2020 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Wed Jul 15 21:30:46 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdbbfae dev-db/influxdb: cleanup new init script Signed-off-by: Robin H. Johnson gentoo.org> dev-db/influxdb/files/influxdb.rc-r1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dev-db/influxdb/files/influxdb.rc-r1 b/dev-db/influxdb/files/influxdb.rc-r1 index 28fd9f6861c..7556a506784 100644 --- a/dev-db/influxdb/files/influxdb.rc-r1 +++ b/dev-db/influxdb/files/influxdb.rc-r1 @@ -1,6 +1,8 @@ #!/sbin/openrc-run config="${config:-/etc/influxdb/influxdb.conf}" +pidfile=${pidfile:-/var/run/influxd.pid} +influxd_opts=${influxd_opts:-} supervisor="supervise-daemon" command=/usr/bin/influxd @@ -19,20 +21,20 @@ rc_ulimit="-n 65536" start_pre() { # Check if config file exist - if [ ! -r ${config} ]; then + if [ ! -r "${config}" ]; then eerror "config file ${config} doesn't exist" return 1 fi - if [ ! -f "$error_log" ]; then - mkdir -p "$(dirname $error_log)" + if [ -n "${error_log}" ] && [ ! -e "${error_log}" ]; then + checkpath -d -o "${command_user}" "$(dirname "${error_log}")" fi - if [ ! -f "$output_log" ]; then - mkdir -p "$(dirname $output_log)" + if [ -n "${output_log}" ] && [ ! -e "${output_log}" ]; then + checkpath -d -o "${command_user}" "$(dirname "${output_log}")" fi return 0 } -if [[ -n "${INFLUXDB_HEALTHCHECK_URI}" ]]; then +if [ -n "${INFLUXDB_HEALTHCHECK_URI}" ]; then healthcheck_delay=300 healthcheck_timer=60