aboutsummaryrefslogtreecommitdiff
path: root/utils/rtty/files
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rtty/files')
-rw-r--r--utils/rtty/files/rtty.config1
-rw-r--r--utils/rtty/files/rtty.init9
2 files changed, 5 insertions, 5 deletions
diff --git a/utils/rtty/files/rtty.config b/utils/rtty/files/rtty.config
index 65138e631..4b9cf51bf 100644
--- a/utils/rtty/files/rtty.config
+++ b/utils/rtty/files/rtty.config
@@ -10,5 +10,4 @@
# option host 'your-server-host' # Server host
# option port '5912' # Server Port
# option ssl 1 # Whether to use ssl
-# option keepalive 5 # keep alive in seconds for this client
# option token 'your-token' # generated by rttys
diff --git a/utils/rtty/files/rtty.init b/utils/rtty/files/rtty.init
index 55a131053..297f393c2 100644
--- a/utils/rtty/files/rtty.init
+++ b/utils/rtty/files/rtty.init
@@ -13,7 +13,6 @@ validate_rtty_section() {
'host:host' \
'port:port' \
'ssl:bool:0' \
- 'keepalive:uinteger:5' \
'token:maxlength(32)'
}
@@ -44,10 +43,12 @@ start_rtty() {
return 1
}
+ [ -z "$id" ] && {
+ id=$(cat /sys/class/net/$ifname/address | sed 's/://g' | tr 'a-z' 'A-Z')
+ }
+
procd_open_instance
- procd_set_param command $BIN -h $host -p $port -a -k $keepalive
- [ -n "$ifname" ] && procd_append_param command -i "$ifname"
- [ -n "$id" ] && procd_append_param command -I "$id"
+ procd_set_param command $BIN -h $host -p $port -I "$id" -a
[ -n "$description" ] && procd_append_param command -d "$description"
[ "$ssl" = "1" ] && procd_append_param command -s
[ -n "$token" ] && procd_append_param command -t "$token"