add graceful shutdown to OpenRC script

This commit is contained in:
Joachim Schlöffel
2026-09-30 10:55:45 +02:00
parent fc965e072c
commit 573608a04b
3 changed files with 10 additions and 2 deletions
@@ -6,6 +6,9 @@ description="SeaweedFS ${service_name} service"
command="/usr/bin/weed"
command_user="${SEAWEEDFS_USER:-seaweedfs}:${SEAWEEDFS_GROUP:-seaweedfs}"
command_background="yes"
# SeaweedFS performs a graceful shutdown, including a 10-second final heartbeat.
# The OpenRC default stop timeout can expire before that work has completed.
retry="TERM/30/KILL/5"
pidfile="/run/seaweedfs/${RC_SVCNAME}.pid"
output_log="${SEAWEEDFS_LOG:-/var/log/seaweedfs/${RC_SVCNAME}.log}"
error_log="${SEAWEEDFS_ERRLOG:-/var/log/seaweedfs/${RC_SVCNAME}.log}"