mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-16 12:45:18 +03:00
38 lines
746 B
Bash
38 lines
746 B
Bash
#!/sbin/openrc-run
|
|
|
|
: ${command_user:="vector:vector"}
|
|
: ${logfile:="/var/log/$RC_SVCNAME.log"}
|
|
|
|
name=vector
|
|
description="Vector high-performance observability data pipeline"
|
|
command="/usr/bin/vector"
|
|
command_background="yes"
|
|
pidfile="/run/$RC_SVCNAME.pid"
|
|
capabilities="^cap_net_bind_service"
|
|
|
|
extra_started_commands="reload"
|
|
description_reload="Reload vector daemon"
|
|
|
|
output_log="$logfile"
|
|
error_log="$logfile"
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -o $command_user /var/lib/vector
|
|
$command validate
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading $RC_SVCNAME"
|
|
$command validate
|
|
if [ -n "$supervisor" ]; then
|
|
$supervisor "$RC_SVCNAME" --signal HUP
|
|
else
|
|
start-stop-daemon --signal HUP --pidfile "$pidfile"
|
|
fi
|
|
eend $?
|
|
}
|