commit
43fd047652
3 changed files with 10 additions and 11 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=rtty
|
PKG_NAME:=rtty
|
||||||
PKG_VERSION:=7.1.0
|
PKG_VERSION:=7.1.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
|
PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
|
||||||
PKG_HASH:=7e3910f0d9d68f1792d445de6b08c740dc4af53258275dc8294aa2d18b455bec
|
PKG_HASH:=05cc5fcf126041f3bc79d92123ff2a19da25806f77fc12286498ee85da139a74
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
|
@ -11,3 +11,4 @@
|
||||||
# option port '5912' # Server Port
|
# option port '5912' # Server Port
|
||||||
# option ssl 1 # Whether to use ssl
|
# option ssl 1 # Whether to use ssl
|
||||||
# option token 'your-token' # generated by rttys
|
# option token 'your-token' # generated by rttys
|
||||||
|
# option verbose '1' # verbose log
|
||||||
|
|
|
@ -13,7 +13,8 @@ validate_rtty_section() {
|
||||||
'host:host' \
|
'host:host' \
|
||||||
'port:port' \
|
'port:port' \
|
||||||
'ssl:bool:0' \
|
'ssl:bool:0' \
|
||||||
'token:maxlength(32)'
|
'token:maxlength(32)' \
|
||||||
|
'verbose:bool:0'
|
||||||
}
|
}
|
||||||
|
|
||||||
start_rtty() {
|
start_rtty() {
|
||||||
|
@ -38,20 +39,17 @@ start_rtty() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$port" ] && {
|
|
||||||
echo "port required" >&2
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "$id" ] && {
|
[ -z "$id" ] && {
|
||||||
id=$(cat /sys/class/net/$ifname/address | sed 's/://g' | tr 'a-z' 'A-Z')
|
id=$(sed 's/://g' /sys/class/net/$ifname/address | tr 'a-z' 'A-Z')
|
||||||
}
|
}
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command $BIN -h $host -p $port -I "$id" -a
|
procd_set_param command $BIN -h $host -I "$id" -a
|
||||||
|
[ -n "$port" ] && procd_append_param command -p "$port"
|
||||||
[ -n "$description" ] && procd_append_param command -d "$description"
|
[ -n "$description" ] && procd_append_param command -d "$description"
|
||||||
[ "$ssl" = "1" ] && procd_append_param command -s
|
[ "$ssl" = "1" ] && procd_append_param command -s
|
||||||
[ -n "$token" ] && procd_append_param command -t "$token"
|
[ -n "$token" ] && procd_append_param command -t "$token"
|
||||||
|
[ "$verbose" = "1" ] && procd_append_param command -v
|
||||||
procd_set_param respawn
|
procd_set_param respawn
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue