n2n/packages/openwrt/etc/init.d/edge
nanpuyue 25ac58900a fix(openwrt): move config to /etc/n2n
The `/etc/config` directory should only store the "UCI" configuration files.

Reference: https://openwrt.org/docs/guide-user/base-system/uci
2020-09-05 12:00:13 +08:00

26 lines
367 B
Bash

#!/bin/sh /etc/rc.common
START=90
STOP=10
USE_PROCD=1
PROG=/usr/bin/edge
CONFIGFILE=/etc/n2n/edge.conf
start_service() {
procd_open_instance
procd_set_param command $PROG $CONFIGFILE
procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance
}
stop_service()
{
service_stop $PROG
}
service_triggers()
{
procd_add_reload_trigger "edge"
}