Skip to content

Commit

Permalink
msd_lite: reload service for interface update
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Jul 5, 2023
1 parent 892bd10 commit 56d7e92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion net/msd_lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=msd_lite
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rozhuk-im/msd_lite.git
Expand Down
12 changes: 1 addition & 11 deletions net/msd_lite/files/msd_lite.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ PROG="/usr/bin/$NAME"
CONF="/etc/$NAME/$NAME.conf.sample"
CONFDIR="/var/run/$NAME"

add_interface_tiggers() {
local enabled interface
config_get_bool enabled "$1" "enabled" "1"
config_get interface "$1" interface

[ "$enabled" -eq "0" -o -z "$interface" ] || procd_add_reload_interface_trigger "$interface"
}

validate_msd_lite_section() {
uci_load_validate "$NAME" "instance" "$1" "$2" \
'enabled:bool:0' \
Expand Down Expand Up @@ -93,7 +85,5 @@ reload_service() {

service_triggers() {
procd_add_reload_trigger "$NAME"

config_load "$NAME"
config_foreach add_interface_tiggers "instance"
procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/$NAME reload
}

0 comments on commit 56d7e92

Please sign in to comment.