Files
MoShiro/packaging/openwrt/native-agent.init
T
justme 15318de919
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/dev-image Pipeline was successful
Restore packaging/openwrt and the Agent updater paths swept into the previous commit [CI]
2026-10-21 15:37:57 +08:00

22 lines
654 B
Bash

#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
start_service() {
[ -f /etc/moshiro/agent.json ] || return 1
mkdir -p /var/run/moshiro-agent
chown moshiro:moshiro /var/run/moshiro-agent
chmod 750 /var/run/moshiro-agent
procd_open_instance
procd_set_param command /usr/lib/moshiro-native/current/moshiro-agent --config /etc/moshiro/agent.json
procd_set_param env LD_LIBRARY_PATH=/usr/lib/moshiro-native/current MOSHIRO_UPDATE=openwrt
procd_set_param user moshiro
procd_set_param group moshiro
procd_set_param respawn 3600 5 0
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param limits nofile=4096
procd_close_instance
}