diff options
author | ZoRo <dos21h@gmail.com> | 2020-08-22 23:13:49 +0100 |
---|---|---|
committer | ZoRo <dos21h@gmail.com> | 2020-08-22 23:13:49 +0100 |
commit | 10b377468b0a4bd2230cd203fa1745163ad39f96 (patch) | |
tree | b1125b30b8a38ade2e799234cee2101263cf250b /send_command.sh | |
download | mqueue_examples-10b377468b0a4bd2230cd203fa1745163ad39f96.tar.gz mqueue_examples-10b377468b0a4bd2230cd203fa1745163ad39f96.zip |
Diffstat (limited to 'send_command.sh')
-rwxr-xr-x | send_command.sh | 15 |
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 |