diff options
Diffstat (limited to 'meta-iot/recipes-web/the-thing-system/steward/start-steward')
-rwxr-xr-x | meta-iot/recipes-web/the-thing-system/steward/start-steward | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-iot/recipes-web/the-thing-system/steward/start-steward b/meta-iot/recipes-web/the-thing-system/steward/start-steward new file mode 100755 index 0000000..1022656 --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/start-steward | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | DIR=`dirname $0` | ||
4 | |||
5 | if [ ! -f $DIR/server.js ]; then | ||
6 | echo "$0: Cannot find $DIR/server.js" | ||
7 | exit -1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$THE_THING_SYSTEM" ]; then | ||
11 | THE_THING_SYSTEM=/opt/TheThingSystem | ||
12 | export THE_THING_SYSTEM | ||
13 | fi | ||
14 | |||
15 | if [ -z "$NODE_PATH" ]; then | ||
16 | NODE_PATH=${THE_THING_SYSTEM}/steward | ||
17 | export NODE_PATH | ||
18 | fi | ||
19 | |||
20 | cd $DIR | ||
21 | node $DIR/server.js $@ | ||
22 | exit $? | ||