packages/utils/bigclown/bigclown-mqtt2influxdb/files/init
Karel Kočí 508e2b865a
bigclown-mqtt2influxdb: update to version 1.2.0
This version introduces new option -d that makes service not to exit on
error. This is brutal solution but is required to protect against
service failure when remote resource is down.

bigclown-mqtt2influxdb is service moving data from MQTT to InfluxDB and
both of those services can and potentially are remote. The original
implementation where it failed when service goes down is not ideal
because network outage or target server outage can later require this
service restart.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
2019-09-16 14:03:29 +02:00

21 lines
326 B
Bash

#!/bin/sh /etc/rc.common
START=99
STOP=1
USE_PROCD=1
PROG=/usr/bin/mqtt2influxdb
CONF=/etc/bigclown-mqtt2influxdb.yml
start_service() {
procd_open_instance
procd_set_param command "$PROG" -d -c "$CONF"
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
stop_service() {
service_stop "$PROG"
}