Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
npeditto committed Jun 1, 2017
1 parent 837ca51 commit e9f43e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etc/init.d/s4t-lightning-rod_ubu14
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH

NAME=lightning-rod
FOLDER=/usr/local/lib/node_modules/iotronic-lightning-rod
DAEMON=/usr/local/lib/node_modules/iotronic-lightning-rod/lr-server.js
DAEMON=$FOLDER/lr-server.js
DESC=lightning-rod
LOGFILE="/var/log/iotronic/lightning-rod.log"
PIDFILE="/var/run/s4t-lightning-rod.pid"
Expand Down
2 changes: 1 addition & 1 deletion etc/systemd/system/s4t-lightning-rod.service
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WorkingDirectory=/usr/lib/node_modules/iotronic-lightning-rod
Environment="NODE_PATH=/usr/lib/node_modules"
Environment="IOTRONIC_HOME=/var/lib/iotronic"
Environment="LIGHTNINGROD_HOME="
ExecStart=/usr/bin/node $LIGHTNINGROD_HOME/lightning-rod.js
ExecStart=/usr/bin/node ${LIGHTNINGROD_HOME}/lightning-rod.js
Restart=always

[Install]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iotronic-lightning-rod",
"version": "1.0.3",
"version": "1.0.4",
"description": "Implementation of the Lightning-rod, the Stack4Things node-side probe (this version works with the standalone version of IoTronic) http://stack4things.unime.it/",
"main": "lightning-rod.js",
"directories": {
Expand Down
3 changes: 3 additions & 0 deletions scripts/lr_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if [ "$DEVICE" = "server" ]; then

cp /usr/local/lib/node_modules/iotronic-lightning-rod/etc/init.d/s4t-lightning-rod_ubu14 /etc/init.d/lightning-rod
chmod +x /etc/init.d/lightning-rod
chmod +x /usr/local/lib/node_modules/iotronic-lightning-rod/lr-server.js

elif [ "$DISTRO" = "16.04" ]; then

Expand All @@ -35,6 +36,7 @@ if [ "$DEVICE" = "server" ]; then
/usr/bin/npm install -g https://github.com/PlayNetwork/node-statvfs/tarball/v3.0.0

cp /usr/lib/node_modules/iotronic-lightning-rod/etc/systemd/system/s4t-lightning-rod.service /etc/systemd/system/lightning-rod.service
sed -i "s/Environment=\"LIGHTNINGROD_HOME=\"/Environment=\"LIGHTNINGROD_HOME=\/usr\/lib\/node_modules\/iotronic-lightning-rod\"/g" /etc/systemd/system/lightning-rod.service
chmod +x /etc/systemd/system/lightning-rod.service
systemctl daemon-reload

Expand All @@ -45,6 +47,7 @@ fi

if [ "$DEVICE" = "raspberry_pi" ]; then
cp /usr/lib/node_modules/iotronic-lightning-rod/etc/systemd/system/s4t-lightning-rod.service /etc/systemd/system/lightning-rod.service
sed -i "s/Environment=\"LIGHTNINGROD_HOME=\"/Environment=\"LIGHTNINGROD_HOME=\/usr\/lib\/node_modules\/iotronic-lightning-rod\"/g" /etc/systemd/system/lightning-rod.service
chmod +x /etc/systemd/system/lightning-rod.service
systemctl daemon-reload
fi
Expand Down

0 comments on commit e9f43e2

Please sign in to comment.