mirror of
https://github.com/acatoire/bipbipzizik.git
synced 2026-03-10 08:01:18 +00:00
Add room parameter option.
This commit is contained in:
18
sonosplay.sh
18
sonosplay.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user