mirror of https://github.com/infosecn1nja/HELK.git
Added check to see if snap is installed
parent
f8cbe7e825
commit
43feaa7407
|
@ -105,11 +105,18 @@ install_docker(){
|
|||
ERROR=$?
|
||||
if [ $ERROR -ne 0 ]; then
|
||||
echoerror "Could not install docker via convenience script (Error Code: $ERROR)."
|
||||
echo "[HELK-INSTALLATION-INFO] Trying to docker install via snap.."
|
||||
snap install docker >> $LOGFILE 2>&1
|
||||
ERROR=$?
|
||||
if [ $ERROR -ne 0 ]; then
|
||||
echoerror "Could not install docker via snap (Error Code: $ERROR)."
|
||||
if [ -x "$(command -v snap)" ]; then
|
||||
SNAP_VERSION=$(snap version | grep -w 'snap' | awk '{print $2}')
|
||||
echo "[HELK-INSTALLATION-INFO] Snap v$SNAP_VERSION is available. Trying to install docker via snap.."
|
||||
snap install docker >> $LOGFILE 2>&1
|
||||
ERROR=$?
|
||||
if [ $ERROR -ne 0 ]; then
|
||||
echoerror "Could not install docker via snap (Error Code: $ERROR)."
|
||||
exit 1
|
||||
fi
|
||||
echo "[HELK-INSTALLATION-INFO] Docker successfully installed via snap."
|
||||
else
|
||||
echo "[HELK-INSTALLATION-INFO] Docker could not be installed. Check /var/log/helk-install.log for details."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue