Skip to content

Commit 6ef1c99

Browse files
authored
quickfix: node-red
1 parent e2a8b8b commit 6ef1c99

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

install/alpine-node-red-install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,28 @@ chown -R nodered:users /home/nodered
3434
chmod 750 /home/nodered
3535
msg_ok "Created /home/nodered"
3636

37+
msg_info "Creating Node-RED Service"
38+
service_path="/etc/init.d/nodered"
39+
40+
echo '#!/sbin/openrc-run
41+
description="Node-RED Service"
42+
43+
command="/usr/local/bin/node-red"
44+
command_args="--max-old-space-size=128 -v"
45+
command_user="nodered"
46+
pidfile="/var/run/nodered.pid"
47+
command_background="yes"
48+
49+
depend() {
50+
use net
51+
}' >$service_path
52+
53+
chmod +x $service_path
54+
msg_ok "Created Node-RED Service"
55+
56+
msg_info "Starting Node-RED"
57+
$STD rc-service nodered start
58+
msg_ok "Started Node-RED"
59+
3760
motd_ssh
3861
customize

0 commit comments

Comments
 (0)