Skip to content

Commit d359110

Browse files
committed
Update ChirpStack components and integrate Node-RED in full image.
1 parent 14870b1 commit d359110

File tree

17 files changed

+2940
-41
lines changed

17 files changed

+2940
-41
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DISTRO = "chirpstack-gateway-os"
22
DISTRO_NAME = "ChirpStack Gateway OS"
3-
DISTRO_VERSION = "3.4.0"
3+
DISTRO_VERSION = "3.5.0"
44

55
DISTRO_FEATURES_append = " wifi"
66
EXTRA_IMAGE_FEATURES_append = " ssh-server-dropbear"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set to 1 enable, 0 to disable.
2+
ENABLED=0
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env sh
2+
3+
NAME="node-red"
4+
DESC="Node-RED"
5+
DAEMON_PID=/var/run/$NAME.pid
6+
7+
if [ -f "/etc/default/${NAME}" ]; then
8+
source "/etc/default/${NAME}"
9+
fi
10+
11+
if [ "${ENABLED}" -ne 1 ]; then
12+
echo "Node-RED is disabled in /etc/default/${NAME}"
13+
exit 0
14+
fi
15+
16+
function do_start {
17+
echo "Starting $NAME"
18+
start-stop-daemon \
19+
--start \
20+
--background \
21+
--make-pidfile \
22+
--pidfile $DAEMON_PID \
23+
--exec node -- /usr/lib/node_modules/node-red/red.js
24+
}
25+
26+
function do_stop {
27+
echo "Stopping $NAME"
28+
start-stop-daemon \
29+
--stop \
30+
--oknodo \
31+
--quiet \
32+
--pidfile $DAEMON_PID
33+
}
34+
35+
case "$1" in
36+
"start")
37+
do_start
38+
;;
39+
"stop")
40+
do_stop
41+
;;
42+
"restart")
43+
do_stop
44+
do_start
45+
;;
46+
*)
47+
echo "Usage: $1 {start|stop|restart}"
48+
exit 1
49+
;;
50+
esac

0 commit comments

Comments
 (0)