Add playermqtt script

This commit is contained in:
Talia 2020-08-27 18:05:50 +02:00
parent be063cab41
commit e1daaba387

9
bin/playermqtt Executable file
View 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