op-packages/pollmydevice/files/pollmydevice.defaults
github-actions[bot] b86d032e91 🤞 Sync 2026-04-23 06:19:46
2026-04-23 06:19:46 +08:00

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