mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 21:55:13 +08:00
35 lines
981 B
Bash
Executable File
35 lines
981 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# shellcheck disable=SC2034 # START/STOP/USE_PROCD/PROG are read by
|
|
# /etc/rc.common, which sources this file; they are never referenced here.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright 2026 VolanticSystems
|
|
|
|
# After netifyd (START=50): appflowd tolerates the agent being absent and
|
|
# retries, but starting later avoids a pointless first reconnect cycle.
|
|
START=95
|
|
STOP=10
|
|
|
|
USE_PROCD=1
|
|
PROG=/usr/sbin/appflowd
|
|
|
|
start_service() {
|
|
procd_open_instance appflowd
|
|
procd_set_param command "$PROG"
|
|
# Keep restarting on unexpected exit: 5 s settle, give up after 5 crashes
|
|
# inside an hour so a genuinely broken build does not spin forever.
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_set_param pidfile /var/run/appflowd.pid
|
|
procd_close_instance
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "appflow"
|
|
}
|
|
|
|
reload_service() {
|
|
# Configuration is read once at start-up; a reload is a restart.
|
|
restart
|
|
}
|