Skip to content

Commit b71dd61

Browse files
authored
Merge pull request SensorsIot#348 from Paraphraser/20210513-nodered-oldmenu
Node-RED revised documentation - PR 2 of 2 - old-menu branch
2 parents 3579f4e + 8ffd7cd commit b71dd61

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.templates/nodered/service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- "1880:1880"
99
volumes:
1010
- ./volumes/nodered/data:/data
11+
- ./volumes/nodered/ssh:/root/.ssh
1112
- /var/run/docker.sock:/var/run/docker.sock
1213
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
1314
devices:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
INTERNAL="/usr/src/node-red/node_modules"
4+
EXTERNAL="$HOME/IOTstack/volumes/nodered/data/node_modules"
5+
6+
echo -e "\nNodes installed by Dockerfile INSIDE the container at $INTERNAL"
7+
8+
CANDIDATES=$(docker exec nodered bash -c "ls -1d $INTERNAL/node-red-*")
9+
10+
for C in $CANDIDATES; do
11+
12+
NODE=$(basename "$C")
13+
14+
# is a node of the same name also present externally
15+
if [ -d "$EXTERNAL/$NODE" ] ; then
16+
17+
# yes! the internal node is blocked by the external node
18+
echo " BLOCKED: $NODE"
19+
20+
else
21+
22+
# no! so that means it's active
23+
echo " ACTIVE: $NODE"
24+
25+
fi
26+
27+
done
28+
29+
echo -e "\nNodes installed by Manage Palette OUTSIDE the container at $EXTERNAL"
30+
31+
CANDIDATES=$(ls -1d "$EXTERNAL/node-red-"*)
32+
33+
for C in $CANDIDATES; do
34+
35+
NODE=$(basename "$C")
36+
37+
echo " $NODE"
38+
39+
done
40+
41+
echo ""

0 commit comments

Comments
 (0)