summaryrefslogtreecommitdiffstats
path: root/send_command.sh
diff options
context:
space:
mode:
authorZoRo <dos21h@gmail.com>2020-08-22 23:13:49 +0100
committerZoRo <dos21h@gmail.com>2020-08-22 23:13:49 +0100
commit10b377468b0a4bd2230cd203fa1745163ad39f96 (patch)
treeb1125b30b8a38ade2e799234cee2101263cf250b /send_command.sh
downloadmqueue_examples-10b377468b0a4bd2230cd203fa1745163ad39f96.tar.gz
mqueue_examples-10b377468b0a4bd2230cd203fa1745163ad39f96.zip
Initial commitHEADmaster
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