darkrc/bin/playermqtt

9 lines
170 B
Bash
Executable file

#!/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