Update node-red-install.sh

add `node-red-start`, `node-red-stop`, `node-red-restart` and `node-red-log` commands
This commit is contained in:
tteckster 2023-08-17 05:21:36 -04:00 committed by GitHub
parent 25c18fbf9e
commit 984d8fc249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,14 @@ msg_ok "Installed Node.js"
msg_info "Installing Node-Red" msg_info "Installing Node-Red"
$STD npm install -g --unsafe-perm node-red $STD npm install -g --unsafe-perm node-red
echo "journalctl -f -n 100 -u nodered -o cat" >/usr/bin/node-red-log
chmod +x /usr/bin/node-red-log
echo "systemctl stop nodered" >/usr/bin/node-red-stop
chmod +x /usr/bin/node-red-stop
echo "systemctl start nodered" >/usr/bin/node-red-start
chmod +x /usr/bin/node-red-start
echo "systemctl restart nodered" >/usr/bin/node-red-restart
chmod +x /usr/bin/node-red-restart
msg_ok "Installed Node-Red" msg_ok "Installed Node-Red"
msg_info "Creating Service" msg_info "Creating Service"