mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-08-04 00:29:27 +08:00
26 lines
578 B
Bash
Executable File
26 lines
578 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
json_load "$(ubus call system board)"
|
|
json_get_var MODEL model
|
|
case "$MODEL" in
|
|
"TELEOFIS LT70")
|
|
uci set pollmydevice.0.rs485_mode='1'
|
|
uci commit pollmydevice
|
|
;;
|
|
"TELEOFIS LT70U")
|
|
uci set pollmydevice.0.rs485_mode='1'
|
|
uci set pollmydevice.1.mode='server'
|
|
uci set pollmydevice.1.baudrate='115200'
|
|
uci commit pollmydevice
|
|
sleep 30 && /etc/pollmydevice/console disable &
|
|
;;
|
|
"TELEOFIS RTUx68 RE-DE")
|
|
uci set pollmydevice.0.rs485_mode='1'
|
|
uci set pollmydevice.2.rs485_mode='1'
|
|
uci commit pollmydevice
|
|
;;
|
|
esac
|
|
|
|
exit 0
|