update 2022-10-22 20:20:21

This commit is contained in:
github-actions[bot] 2022-10-22 20:20:21 +08:00
parent f277bb4c80
commit 20da88808a
2 changed files with 34 additions and 15 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=adguardhome
PKG_VERSION:=0.107.16
PKG_RELEASE:=69
PKG_RELEASE:=71
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=16755c37d8e42bb6bc5266081f7a0defeb6554e2

View File

@ -1,22 +1,41 @@
#!/bin/sh /etc/rc.common
# Created By ImmortalWrt
# https://github.com/project-openwrt
# https://github.com/immortalwrt
START=90
STOP=10
USE_PROCD=1
enable="$(uci get gost.@gost[0].enable)"
run_command="$(uci get gost.@gost[0].run_command)"
START=99
GOST=/usr/bin/gost
start()
{
stop
[ "${enable}" -ne "1" ] && exit 0
/usr/bin/gost ${run_command} &
start_service() {
config_load "gost"
config_foreach start_instance
}
stop()
{
killall -9 "gost" > "/dev/null" 2>&1
service_enabled() {
config_get_bool enabled "$1" 'enable' 0
[ $enabled -gt 0 ]
}
start_instance() {
if ! service_enabled "$1"; then
return 1
fi
config_get run_command "$1" 'run_command'
procd_open_instance
procd_set_param command $GOST
procd_append_param command $run_command
procd_set_param file /etc/config/gost
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger gost
}