Add playermqtt script
This commit is contained in:
parent
be063cab41
commit
e1daaba387
1 changed files with 9 additions and 0 deletions
9
bin/playermqtt
Executable file
9
bin/playermqtt
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
server=$1
|
||||
shift
|
||||
|
||||
if [ -z "$@" ]
|
||||
then mosquitto_sub -h $server -t 'players/#' | xargs -I{} playerctl {}
|
||||
else mosquitto_pub -h $server -t 'players' -m "$@"
|
||||
fi
|
Loading…
Reference in a new issue