diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2020-07-15 14:02:50 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2020-07-15 14:30:46 -0700 |
commit | 4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe (patch) | |
tree | 1fd0d81d04b156a30c85cb29d1b669d064d4b483 /dev-db/influxdb | |
parent | dev-db/influxdb bump version 1.8.0, fix -version option, USE flag doc (diff) | |
download | gentoo-4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe.tar.gz gentoo-4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe.tar.bz2 gentoo-4bdbbfae0e5bb38d32a86f43b7a2c2cd57c70dfe.zip |
dev-db/influxdb: cleanup new init script
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'dev-db/influxdb')
-rw-r--r-- | dev-db/influxdb/files/influxdb.rc-r1 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dev-db/influxdb/files/influxdb.rc-r1 b/dev-db/influxdb/files/influxdb.rc-r1 index 28fd9f6861c0..7556a506784d 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 |