Files
wlan-ap/feeds/ucentral/ucentral-defaults/files/usr/libexec/ucentral/ucentral_cmd.sh
John Crispin 256c322f85 ucentral: development update
* update base 21.02 revision
* update v5.10 support
* fix captive portal
* cleanup ucentral-* packages
* update ucentral-* packages
* cleanup profiles
* fix worflow

Signed-off-by: John Crispin <john@phrozen.org>
2021-04-07 11:48:28 +02:00

19 lines
342 B
Bash
Executable File

#!/bin/sh
cmd=$1
id=$2
[ -f "$cmd" -a -n "$id" ] || {
logger "ucentral_cmd: invalid paramters"
exit 1
}
ucode -m uci -m fs -m ubus -E capab=/etc/ucentral/capabilities.json -E cmd=$cmd -e "{\"id\":$id}" -i /usr/share/ucentral/cmd.uc > /tmp/ucentral.cmd
[ $? -eq 0 ] || {
logger "ucentral_cmd: executing $cmd failed"
exit 1
}
return 0