diff --git a/setup/so-analyst b/salt/common/tools/sbin/so-analyst-install similarity index 86% rename from setup/so-analyst rename to salt/common/tools/sbin/so-analyst-install index 18f25644c..a8631fab2 100755 --- a/setup/so-analyst +++ b/salt/common/tools/sbin/so-analyst-install @@ -28,8 +28,10 @@ fi if [[ "$manufacturer" == "Security Onion Solutions" && "$family" == "Automated" ]]; then INSTALL=yes + CURLCONTINUE=no else INSTALL='' + CURLCONTINUE='' fi while [[ $INSTALL != "yes" ]] && [[ $INSTALL != "no" ]]; do @@ -53,7 +55,20 @@ if [[ $INSTALL == "no" ]]; then exit 0 fi - +echo "Testing for internet connection with curl https://securityonionsolutions.com/" +CANCURL=$(curl -sI https://securityonionsolutions.com/ | grep "200 OK") + if [ $? -ne 0 ]; then + echo "We could not access https://securityonionsolutions.com/. Since packages are downloaded from the internet in order to configure the analyst node, internet acceess is required. If you would like to ignore this warning and continue anyway, please type 'yes'. Otherwise, type 'no' to exit." + read CURLCONTINUE + while [[ $CURLCONTINUE != "yes" ]] && [[ $CURLCONTINUE != "no" ]]; do + echo "We could not access https://securityonionsolutions.com/. Since packages are downloaded from the internet in order to configure the analyst node, internet acceess is required. If you would like to ignore this warning and continue anyway, please type 'yes'. Otherwise, type 'no' to exit." + read CURLCONTINUE + done + if [[ "$CURLCONTINUE" == "no" ]]; then + echo "Exiting analyst node installation." + exit 0 + fi + fi # Install a GUI text editor yum -y install gedit diff --git a/so-analyst-install b/so-analyst-install new file mode 100755 index 000000000..1c63f70a0 --- /dev/null +++ b/so-analyst-install @@ -0,0 +1,20 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +cd "$(dirname "$0")/salt/common/tools/sbin" || exit 255 + +./so-analyst-install \ No newline at end of file