acu rtty config
root@ACU:~# tree /etc/config/root/ /etc/config/root/ ├── etc │?? ├── config │?? │?? └── rtty │?? └── init.d │?? └── rtty └── usr ├── lib │?? ├── libev.so -> libev.so.4.0.0 │?? ├── libev.so.4 -> libev.so.4.0.0 │?? └── libev.so.4.0.0 └── sbin ├── rtty └── tree 6 directories, 7 files root@ACU:~# root@ACU:~# ls -alh /etc/rc.local -rwxr-xr-x 1 root root 291 Jul 17 11:14 /etc/rc.local root@ACU:~# root@ACU:~# cat /etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. [ -d "/etc/config/root" ] && cp -af /etc/config/root/* / && echo "copy file ..." [ -f "/etc/init.d/rtty" ] && /etc/init.d/rtty start && echo "rtty start ..." exit 0 root@ACU:~# root@ACU:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.179.128.1 0.0.0.0 UG 0 0 0 br-lan3074 10.179.128.0 * 255.255.128.0 U 0 0 0 br-lan3074 192.168.0.0 * 255.255.255.0 U 0 0 0 br-lan3074 192.192.192.0 * 255.255.255.0 U 0 0 0 br-lan0 192.192.192.0 * 255.255.255.0 U 0 0 0 eth0 root@ACU:~# root@ACU:~# route -n | grep "0.0.0.0.*0.0.0.0" | awk '{print $8}' br-lan3074 root@ACU:~# root@ACU:~# uci set rtty.@rtty[0].ifname="$(route -n | grep "0.0.0.0.*0.0.0.0" | awk '{print $8}')" root@ACU:~# root@ACU:~# uci set rtty.@rtty[0].id="WH_SJWX_ditel_test001" root@ACU:~# root@ACU:~# uci commit rtty root@ACU:~# root@ACU:~# cat /etc/config/rtty config rtty option ifname 'br-lan3074' option id 'WH_SJWX_ditel_test001' # option description 'Description of my device' option host '10.0.8.151' # Server host option port '5912' # Server Port # option ssl '1' # Whether to use ssl # option insecure '1' # Allow insecure server connections when using SSL # option token 'your-token' # generated by rttys # option username 'root' # Skip a second login authentication. See man login(1) about the details # option verbose '1' # verbose log root@ACU:~# root@ACU:~# root@ACU:~# uci show rtty rtty.@rtty[0]=rtty rtty.@rtty[0].ifname='br-lan3074' rtty.@rtty[0].host='10.0.8.151' rtty.@rtty[0].port='5912' rtty.@rtty[0].id='WH_SJWX_ditel_test001' root@ACU:~# root@ACU:~# root@ACU:~# /etc/init.d/rtty stop Killed root@ACU:~# root@ACU:~# /etc/init.d/rtty start rtty service has started. root@ACU:~#
rttys - http://10.0.8.151:5913/
=========== End
标签:acu,config,rtty,etc,ACU,0.0,root,option From: https://www.cnblogs.com/lsgxeva/p/17559751.html