bridges start <Node> <Topic> <Options>

This commit is contained in:
Feng Lee 2015-07-25 14:15:37 +08:00
parent 268fcace65
commit c6c3926962
1 changed files with 10 additions and 2 deletions

View File

@ -225,13 +225,19 @@ case "$1" in
fi
if [[ $# -eq 2 ]] && [[ $2 = "list" ]]; then
$NODETOOL rpc emqttd_ctl bridges list
elif [ $# -eq 4 ]; then
elif [[ $# -eq 2 ]] && [[ $2 = "options" ]]; then
$NODETOOL rpc emqttd_ctl bridges options
elif [[ $# -eq 4 ]] && [[ $2 = "stop" ]]; then
shift
$NODETOOL rpc emqttd_ctl bridges $@
elif [[ $# -ge 4 ]] && [[ $2 = "start" ]]; then
shift
$NODETOOL rpc emqttd_ctl bridges $@
else
echo "Usage: "
echo "$SCRIPT bridges list"
echo "$SCRIPT bridges start <Node> <Topic>"
echo "$SCRIPT bridges start <Node> <Topic> <Options>"
echo "$SCRIPT bridges stop <Node> <Topic>"
exit 1
fi
@ -308,8 +314,10 @@ case "$1" in
echo " plugins unload <Plugin> #unload plugin"
echo " ----------------------------------------------------------------"
echo " bridges list #query bridges"
echo " bridges options #bridge options"
echo " bridges start <Node> <Topic> #start bridge"
echo " bridges stop <Node> <Topic> #stop bridge"
echo " bridges start <Node> <Topic> <Options> #start bridge with options"
echo " bridges stop <Node> <Topic> #stop bridge"
echo " ----------------------------------------------------------------"
echo " useradd <Username> <Password> #add user"
echo " userdel <Username> #delete user"