File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 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 :
Original file line number Diff line number Diff line change 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 " "
You can’t perform that action at this time.
0 commit comments