mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 14:26:38 +02:00
33 lines
680 B
Bash
33 lines
680 B
Bash
#!/sbin/openrc-run
|
|
|
|
name="Sentinel-proxy"
|
|
description="A proxy that relays messages received over ZMQ to Sentinel server over MQTT"
|
|
|
|
: ${command_user:="sentinel"}
|
|
: ${cfgfile:="/etc/sentinel/proxy.cfg"}
|
|
: ${syslog:="yes"}
|
|
|
|
command="/usr/bin/sentinel-proxy"
|
|
command_args="
|
|
--config=$cfgfile
|
|
${logfile:+"--log-file=$logfile"}
|
|
${loglevel:+"--log-level=$loglevel"}
|
|
$command_args
|
|
"
|
|
command_background="yes"
|
|
pidfile="/run/$RC_SVCNAME.pid"
|
|
|
|
required_files="$cfgfile"
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
start_pre() {
|
|
yesno "${syslog-}" && command_args="$command_args --syslog"
|
|
|
|
if [ "${logfile-}" ]; then
|
|
checkpath -f -m 640 -o "$command_user" "$logfile" || return 1
|
|
fi
|
|
}
|