Add room parameter option.

This commit is contained in:
DESKTOP-DFRO5T8\Axel
2019-04-16 23:59:46 +02:00
parent 78db7049f5
commit 2b7265c49c

View File

@@ -3,8 +3,18 @@
# Get arguments
addr=$1 # Mendatory - exemple : http://192.168.0.140:5005
cmd=$2 # Mendatory - exemple : volume/50
#where=$3 # Optional - exemple : salon TODO
where=$3 # Optional - exemple : salon TODO
echo "Execute the command '$cmd' on the server at '$addr'"
# Execute the sonos api request using curl
if [ -z $where ]
then
curl -X GET $addr/$cmd
else
echo "only for the room $where"
curl -X GET $addr/$where/$cmd
fi
# Execut the sonos api request using curl
curl -X GET $addr/$cmd todo add where as optional
#curl -X GET $addr/$where/$cmd TODO add $where as optional