darkrc/bin/playermqtt

10 lines
170 B
Text
Raw Normal View History

2020-08-27 16:05:50 +00:00
#!/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