Browse Source

frp: add service_trigger

Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
lilik-openwrt-22.03
Van Waholtz 3 years ago
committed by Rosen Penev
parent
commit
5c93d6475b
2 changed files with 20 additions and 0 deletions
  1. +10
    -0
      net/frp/files/frpc.init
  2. +10
    -0
      net/frp/files/frps.init

+ 10
- 0
net/frp/files/frpc.init View File

@ -37,6 +37,11 @@ config_cb() {
fi fi
} }
service_triggers()
{
procd_add_reload_trigger "$NAME"
}
start_service() { start_service() {
local init_cfg=" " local init_cfg=" "
local conf_file="/var/etc/$NAME.ini" local conf_file="/var/etc/$NAME.ini"
@ -72,3 +77,8 @@ start_service() {
[ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env" [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
procd_close_instance procd_close_instance
} }
reload_service() {
stop
start
}

+ 10
- 0
net/frp/files/frps.init View File

@ -35,6 +35,11 @@ config_cb() {
fi fi
} }
service_triggers()
{
procd_add_reload_trigger "$NAME"
}
start_service() { start_service() {
local init_cfg=" " local init_cfg=" "
local conf_file="/var/etc/$NAME.ini" local conf_file="/var/etc/$NAME.ini"
@ -70,3 +75,8 @@ start_service() {
[ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env" [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
procd_close_instance procd_close_instance
} }
reload_service() {
stop
start
}

Loading…
Cancel
Save