From ee7b30696cb2bd9eb8097ea2ff3f31c46f233ce9 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 2 Jan 2014 01:15:58 +0100 Subject: [PATCH] fix another script --- tests/addconfigureddevice.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/addconfigureddevice.sh b/tests/addconfigureddevice.sh index 48092f10..bd322b92 100755 --- a/tests/addconfigureddevice.sh +++ b/tests/addconfigureddevice.sh @@ -1,4 +1,8 @@ #!/bin/bash # Creates a Mumbi remote -(echo '{"id":1, "method":"Devices.AddConfiguredDevice", "params":{"deviceClass": "{d85c1ef4-197c-4053-8e40-707aa671d302}", "deviceParams":{"channel1":"false", "channel2":"false", "channel3":"false", "channel4": "false", "channel5":"false" }}}'; sleep 1) | nc 10.10.10.114 1234 +if [ -z $1 ]; then + echo "usage $0 host" +else + (echo '{"id":1, "method":"Devices.AddConfiguredDevice", "params":{"deviceClass": "{d85c1ef4-197c-4053-8e40-707aa671d302}", "deviceParams":{"channel1":"false", "channel2":"false", "channel3":"false", "channel4": "false", "channel5":"false" }}}'; sleep 1) | nc $1 1234 +fi