summaryrefslogtreecommitdiffstats
path: root/send_command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'send_command.sh')
-rwxr-xr-xsend_command.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/send_command.sh b/send_command.sh
new file mode 100755
index 0000000..59219b6
--- /dev/null
+++ b/send_command.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+QUEUE_NAME=/music-player-daemon
+
+SEND_CMD()
+{
+ ./mqueue_push -m $QUEUE_NAME -p "$1"
+}
+
+echo "Send command to daemon"
+if [ -f "/dev/mqueue$QUEUE_NAME" ]; then
+ SEND_CMD $1
+else
+ echo "No queue to send"
+fi