OpenWrt 添加自定义 Service

本文地址:blog.lucien.ink/archives/530
#!/bin/sh /etc/rc.common
# "new" style init script
# Look at /lib/functions/service.sh on a running system for explanations of what other SERVICE_
# options you can use, and when you might want them.

START=80
APP=node_exporter
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1

start() {
        service_start /etc/usr/local/node_exporter/${APP}
}

stop() {
        service_stop /etc/usr/local/node_exporter/${APP}
}
最后修改:2022 年 09 月 18 日
谢谢老板!