diff options
Diffstat (limited to 'meta-iot/recipes-web/the-thing-system/steward')
6 files changed, 154 insertions, 0 deletions
diff --git a/meta-iot/recipes-web/the-thing-system/steward/npm-setup-proxies.example b/meta-iot/recipes-web/the-thing-system/steward/npm-setup-proxies.example new file mode 100644 index 0000000..e52bf27 --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/npm-setup-proxies.example | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Setup proxies | ||
4 | npm config set proxy http://proxy.example.com:8080 | ||
5 | npm config set https-proxy http://proxy.example.com:8080 | ||
diff --git a/meta-iot/recipes-web/the-thing-system/steward/package.json b/meta-iot/recipes-web/the-thing-system/steward/package.json new file mode 100644 index 0000000..ff865f2 --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/package.json | |||
@@ -0,0 +1,90 @@ | |||
1 | { "name" : "node-steward" | ||
2 | , "readmeFilename" : "README.md" | ||
3 | , "version" : "1.5.1" | ||
4 | , "private" : true | ||
5 | , "engines" : | ||
6 | { "node" : ">=0.10.22" | ||
7 | } | ||
8 | , "license" : "MIT" | ||
9 | , "dependencies" : | ||
10 | { "MD5" : "1.0.3" | ||
11 | , "aerogel" : "git://github.com/TheThingSystem/aerogel.git" | ||
12 | , "airplay" : "git://github.com/TheThingSystem/node-airplay.git" | ||
13 | , "arp-a" : "0.3.0" | ||
14 | , "async" : "0.2.9" | ||
15 | , "axiscam" : "0.0.4" | ||
16 | , "automatic-api" : "0.9.3" | ||
17 | , "avahi_pub" : "git://github.com/TheThingSystem/node_avahi_pub.git" | ||
18 | , "blinkstick" : "git://github.com/TheThingSystem/blinkstick-node.git" | ||
19 | , "color-convert" : "0.3.1" | ||
20 | , "colors" : "0.6.2" | ||
21 | , "cosm" : "git://github.com/TheThingSystem/node-cosm.git" | ||
22 | , "cron-parser" : "git://github.com/TheThingSystem/node-cron-parser.git" | ||
23 | , "cycle" : "1.0.2" | ||
24 | , "eureka-dongle" : "0.1.0" | ||
25 | , "flower-power-cloud" : "0.2.0" | ||
26 | , "geocoder" : "0.1.0" | ||
27 | , "greenwave-gop" : "0.0.2" | ||
28 | , "grovestreams-api" : "0.2.3" | ||
29 | , "irobot" : "git://github.com/TheThingSystem/irobot.git" | ||
30 | , "json-stringify-safe" : "4.0.0" | ||
31 | , "koubachi" : "0.0.4" | ||
32 | , "lifx" : "git://github.com/TheThingSystem/lifxjs.git" | ||
33 | , "line-reader" : "0.2.3" | ||
34 | , "lockitron-api" : "0.3.1" | ||
35 | , "longjohn" : "0.2.0" | ||
36 | , "lumen" : "git://github.com/TheThingSystem/node-lumen.git" | ||
37 | , "mdns" : "git://github.com/TheThingSystem/node_mdns.git" | ||
38 | , "mime" : "1.2.9" | ||
39 | , "mqtt" : "git://github.com/TheThingSystem/MQTT.js.git" | ||
40 | , "netmask" : "1.0.4" | ||
41 | , "noble" : "git://github.com/jukkar/noble.git" | ||
42 | , "node-blink1" : "0.1.0" | ||
43 | , "node-cassandra-cql" : "git://github.com/TheThingSystem/node-cassandra-cql.git" | ||
44 | , "node-dweetio" : "0.0.8" | ||
45 | , "node-hid" : "0.2.3" | ||
46 | , "node-lsof" : "git://github.com/TheThingSystem/node-lsof.git" | ||
47 | , "node-netatmo" : "git://github.com/TheThingSystem/node-netatmo.git" | ||
48 | , "notify-my-android" : "0.0.1" | ||
49 | , "node-prowl" : "git://github.com/TheThingSystem/node-prowl.git" | ||
50 | , "node-ssdp" : "git://github.com/TheThingSystem/node-ssdp.git" | ||
51 | , "node-ssh-fingerprint" : "git://github.com/TheThingSystem/node-ssh-fingerprint.git" | ||
52 | , "node-uuid" : "1.4.0" | ||
53 | , "node-winkapi" : "0.1.2" | ||
54 | , "observer" : "1.1.0" | ||
55 | , "openzwave" : "0.0.32" | ||
56 | , "pcap" : "1.2.0" | ||
57 | , "pkginfo" : "0.3.0" | ||
58 | , "pixelpusher" : "0.1.1" | ||
59 | , "polyline-encoded" : "0.0.4" | ||
60 | , "portfinder" : "0.2.1" | ||
61 | , "rfxcom" : "git://github.com/TheThingSystem/node-rfxcom.git" | ||
62 | , "robosmart" : "0.1.1" | ||
63 | , "roku" : "0.2.0" | ||
64 | , "samsung-airconditioner" : "git://github.com/TheThingSystem/node-samsung-airconditioner.git" | ||
65 | , "sensortag" : "git://github.com/sandeepmistry/node-sensortag.git" | ||
66 | , "serialport" : "~1.1.0" | ||
67 | , "soap" : "0.2.7" | ||
68 | , "sonos" : "git://github.com/TheThingSystem/node-sonos.git" | ||
69 | , "speakeasy" : "git://github.com/TheThingSystem/speakeasy.git" | ||
70 | , "sqlite3" : "2.1.7" | ||
71 | , "ssh-keygen" : "git://github.com/TheThingSystem/ssh-keygen.git" | ||
72 | , "stack-trace" : "0.0.6" | ||
73 | , "suncalc" : "1.2.1" | ||
74 | , "teslams" : "0.8.6" | ||
75 | , "underscore" : "1.5.1" | ||
76 | , "unofficial-nest-api" : "git://github.com/TheThingSystem/unofficial_nodejs_nest.git" | ||
77 | , "validator" : "1.1.3" | ||
78 | , "wake_on_lan" : "0.0.3" | ||
79 | , "winston" : "0.6.2" | ||
80 | , "ws" : "git://github.com/TheThingSystem/ws.git" | ||
81 | , "x509-keygen" : "0.2.2" | ||
82 | , "xml2js" : "0.2.7" | ||
83 | , "xml2json" : "0.3.2" | ||
84 | , "xmlbuilder" : "0.4.x" | ||
85 | , "xmldom" : "0.1.x" | ||
86 | , "xmlhttprequest" : "git://github.com/TheThingSystem/node-XMLHttpRequest.git" | ||
87 | , "yoctolib" : "git://github.com/TheThingSystem/yoctolib_nodejs.git" | ||
88 | , "yql" : "git://github.com/TheThingSystem/node-yql.git" | ||
89 | } | ||
90 | } | ||
diff --git a/meta-iot/recipes-web/the-thing-system/steward/server.js.in b/meta-iot/recipes-web/the-thing-system/steward/server.js.in new file mode 100644 index 0000000..32f6b82 --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/server.js.in | |||
@@ -0,0 +1,3 @@ | |||
1 | require('@the_thing_system_dir@/steward/core/utility').start(); | ||
2 | require('@the_thing_system_dir@/steward/core/database').start(); | ||
3 | require('@the_thing_system_dir@/steward/core/steward').start(); | ||
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 $? | ||
diff --git a/meta-iot/recipes-web/the-thing-system/steward/start-steward.debug b/meta-iot/recipes-web/the-thing-system/steward/start-steward.debug new file mode 100755 index 0000000..12c89dc --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/start-steward.debug | |||
@@ -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 | DEBUG=hci-ble node $DIR/server.js $@ | ||
22 | exit $? | ||
diff --git a/meta-iot/recipes-web/the-thing-system/steward/steward.service.in b/meta-iot/recipes-web/the-thing-system/steward/steward.service.in new file mode 100644 index 0000000..894f29a --- /dev/null +++ b/meta-iot/recipes-web/the-thing-system/steward/steward.service.in | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Steward for TheThingSystem | ||
3 | After=steward-init.service | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | EnvironmentFile=-/etc/TheThingSystem/config | ||
8 | ExecStart=@the_thing_system_dir@/steward/start-steward | ||
9 | Restart=on-failure | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||