From 123175287a1d880fabb5632f95cd6b6e493adc79 Mon Sep 17 00:00:00 2001 From: Gerrit Linnemann Date: Sun, 15 Nov 2015 21:52:12 +0100 Subject: [PATCH] shell to call other shell --- kitchenradio/app/radio.js | 4 ++-- kitchenradio/bin/action.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 kitchenradio/bin/action.sh diff --git a/kitchenradio/app/radio.js b/kitchenradio/app/radio.js index 33331a0..affb6ba 100644 --- a/kitchenradio/app/radio.js +++ b/kitchenradio/app/radio.js @@ -102,8 +102,8 @@ exports.play = function(idx) { }*/ var Child = spawn( - App.get('tools_root')+'start_radio.sh', - [] + App.get('tools_root')+'action.sh', + ['play'] ); // listen for any response from the child diff --git a/kitchenradio/bin/action.sh b/kitchenradio/bin/action.sh new file mode 100755 index 0000000..464de6a --- /dev/null +++ b/kitchenradio/bin/action.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# V0.1 + + +### DEFINITIONS + +MY_PATH="$(pwd)" +#. $MY_PATH/bin/_inc/def_text_coloring.sh + + +### PRORGAM + +echo "Action: $1" + +case $1 in + 1) echo "play" ;; + *) echo "INVALID ACTION!" ;; +esac \ No newline at end of file