update 2022-06-20 20:22:04

This commit is contained in:
github-actions[bot] 2022-06-20 20:22:04 +08:00
parent 22d0202340
commit 5dbb7c1cd7
5 changed files with 32 additions and 22 deletions

View File

@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_ARCH_DDNSTO:=$(ARCH)
PKG_NAME:=ddnsto
PKG_VERSION:=0.3.3
PKG_VERSION:=1.5.0
PKG_RELEASE:=$(PKG_ARCH_DDNSTO)-2
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/ddnsto/
PKG_HASH:=8a51602f8849db96d4c57dca27064ec5e68c0b7169510041500f016d354427cb
PKG_HASH:=5e7c0a3669bf5a8fa100e97afcb4bbc713ee39edab92a8ff2e1373b96114c285
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
@ -57,6 +57,7 @@ endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ddnsto.$(PKG_ARCH_DDNSTO) $(1)/usr/sbin/ddnsto
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ddwebdav.$(PKG_ARCH_DDNSTO) $(1)/usr/sbin/ddwebdav
$(INSTALL_CONF) ./files/ddnsto.config $(1)/etc/config/ddnsto
$(INSTALL_BIN) ./files/ddnsto.init $(1)/etc/init.d/ddnsto
$(INSTALL_BIN) ./files/ddnsto-monitor.sh $(1)/usr/sbin/ddnsto-monitor.sh

4
ddnsto/files/ddnsto-monitor.sh Executable file → Normal file
View File

@ -21,6 +21,8 @@ echo "ddnsto version device_id is is:"
_term() {
killall ddnsto 2>/dev/null
killall ddwebdav 2>/dev/null
rm -f /tmp/.ddnsto.pid
rm -f /tmp/.ddnsto.status
rm -f /tmp/.ddnsto.up
@ -31,6 +33,7 @@ trap "_term;" SIGTERM
while true ; do
if ! pidof "ddnsto" > /dev/null ; then
echo "ddnsto try running"
/usr/sbin/ddnsto -u ${TOKEN} -x ${DEVICE_IDX} &
PID=$!
wait $PID
@ -43,4 +46,3 @@ while true ; do
fi
sleep 20
done

View File

@ -1,3 +1,9 @@
config ddnsto
option 'token' ''
option 'enabled' '0'
option 'feat_port' '3030'
option 'feat_username' ''
option 'feat_password' ''
option 'feat_enabled' '0'
option 'feat_disk_path_selected' ''
option 'index' '0'

35
ddnsto/files/ddnsto.init Executable file → Normal file
View File

@ -4,27 +4,28 @@ START=99
USE_PROCD=1
get_config() {
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 0
config_get token $1 token
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 0
config_get token $1 token
config_get index $1 index 0
}
start_service() {
config_load ddnsto
config_foreach get_config ddnsto
[ $enabled != 1 ] && return 1
if [ -z "$token" ]; then
logger -t ddnsto -p warn "token not set"
return 1
fi
procd_open_instance
procd_set_param command /usr/sbin/ddnsto-monitor.sh -u "$token" -x 0
[ "$logger" == 1 ] && procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
config_load ddnsto
config_foreach get_config ddnsto
[ $enabled != 1 ] && return 1
if [ -z "$token" ]; then
logger -t ddnsto -p warn "token not set"
return 1
fi
procd_open_instance
procd_set_param command /usr/sbin/ddnsto-monitor.sh -u "$token" -x $index
[ "$logger" == 1 ] && procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger "ddnsto"
procd_add_reload_trigger "ddnsto"
}

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=Xray-core
PKG_VERSION:=1.5.7
PKG_VERSION:=1.5.8
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=6e1761b63da7fb17da98aa6cf74d224882467cd9825c12eb0ab28eacf8d92d19
PKG_HASH:=1d1f7f3de0596c430fde6e3027b93c45f5fa340d291c05bc48216750dc77ca8f
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MPL-2.0