Docker network check fix
@@ -542,12 +542,16 @@ if [ ${WHATTOINSTALL} = "full" ]; then
fi
echo "Creating Docker bridged network"
- # checking of network is already there
- if [ ! "docker network ls|grep dockernetredelk" ]; then docker network create -d bridge --subnet 192.168.254.0/24 --gateway 192.168.254.1 dockernetredelk >> $LOGFILE 2>&1 ; fi
+ # checking of network is already there, perhaps due to aborted/crashed/previous install
+ docker network ls 2> /dev/null | grep dockernetredelk > /dev/null
+ ERROR=$?
+ if [ $ERROR -ne 0 ]; then
+ docker network create -d bridge --subnet 192.168.254.0/24 --gateway 192.168.254.1 dockernetredelk >> $LOGFILE 2>&1
ERROR=$?
if [ $ERROR -ne 0 ]; then
echoerror "Could not create Docker bridged network (Error Code: $ERROR)."
fi
+ fi
echo "Creating Jupyter Notebooks working dir and copying notebooks"
mkdir /usr/share/redelk/jupyter && cp ./jupyter/* /usr/share/redelk/jupyter/ && chown -R redelk:redelk /usr/share/redelk/jupyter && chmod 777 /usr/share/redelk/jupyter >> $LOGFILE 2>&1
