add install and install-service scripts update readme
parent
e69e6fb2db
commit
e4d19d0e09
|
@ -1,9 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sudo rm /etc/systemd/system/node-red@.service
|
sudo npm install -g --unsafe-perm node-red
|
||||||
sudo ln -s /opt/node-red-run/node-red.service /etc/systemd/system/
|
sudo npm install -g esm
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl enable node-red
|
|
||||||
sudo systemctl restart node-red
|
|
||||||
sleep 5
|
|
||||||
sudo journalctl --unit=node-red -n 50 --no-pager
|
|
||||||
exit 1
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sudo rm /etc/systemd/system/node-red@.service
|
||||||
|
sudo ln -s /opt/node-red-run/node-red.service /etc/systemd/system/
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable node-red
|
||||||
|
sudo systemctl restart node-red
|
||||||
|
sleep 5
|
||||||
|
sudo journalctl --unit=node-red -n 50 --no-pager
|
||||||
|
exit 1
|
19
readme.md
19
readme.md
|
@ -2,10 +2,21 @@
|
||||||
|
|
||||||
This repo aids in keeping node-red up to date and running via a systemd Service
|
This repo aids in keeping node-red up to date and running via a systemd Service
|
||||||
|
|
||||||
install nodered and esm globally
|
Clone this repo
|
||||||
|
|
||||||
sudo npm install -g --unsafe-perm node-red && sudo npm install -g esm
|
git clone https://git.kebler.net/IOT/node-red-run.git /opt/node-red-run && \
|
||||||
|
cd /opt/node-red-run && \
|
||||||
|
./install
|
||||||
|
|
||||||
Just clone repo to `/opt`
|
you can try running nodered `./run <dir>`
|
||||||
|
<dir> is optional user directory if unset will be `/opt/node-red`
|
||||||
|
|
||||||
you can run the /.start script
|
if that works fine then if need be edit the node-red.service file environment varaiable for alternative user directory otherwise it will use the default `/opt/node-red`
|
||||||
|
|
||||||
|
run `./install-service` script
|
||||||
|
|
||||||
|
all should be find and the node-red should be running at :1880
|
||||||
|
|
||||||
|
`./start` and `./stop` script are systemctl aliases which can used after install
|
||||||
|
|
||||||
|
run `./update` to update the latest version of node-red and esm
|
||||||
|
|
Loading…
Reference in New Issue