Files
fips/packaging/openwrt-ipk/files/etc/init.d/fips
T
Johnathan Corgan cb6f263a1d Add node.log_level config, remove RUST_LOG from service files
Add log_level field to NodeConfig (case-insensitive, default: info).
The daemon now loads config before initializing tracing so the
configured level takes effect. RUST_LOG env var still overrides if
set.

Remove hardcoded Environment=RUST_LOG=info from systemd units and
OpenWrt procd init script — these prevented config-driven log levels
from working.
2026-03-25 15:34:47 +00:00

28 lines
623 B
Bash

#!/bin/sh /etc/rc.common
# FIPS mesh daemon — procd init script for OpenWrt
USE_PROCD=1
START=95
STOP=10
PROG=/usr/bin/fips
CONFIG=/etc/fips/fips.yaml
start_service() {
# Ensure TUN module is loaded before starting the daemon.
modprobe tun 2>/dev/null || true
procd_open_instance
procd_set_param command "$PROG" --config "$CONFIG"
# Respawn: restart after 5 s, give up after 5 consecutive failures within
# a 3600 s window, then reset the failure counter and try again.
procd_set_param respawn 3600 5 5
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
reload_service() {
restart
}