mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-17 14:33:11 +01:00
[refactor] Check for setup log earlier
* Check for sosetuo.log before any scripts besides so-variables are sourced to make sure the log hasn't been created yet.
This commit is contained in:
@@ -24,10 +24,19 @@ fi
|
|||||||
|
|
||||||
cd "$(dirname "$0")" || exit 255
|
cd "$(dirname "$0")" || exit 255
|
||||||
|
|
||||||
|
source ./so-variables
|
||||||
|
|
||||||
|
is_reinstall=false
|
||||||
|
if [[ -f $setup_log ]]; then
|
||||||
|
is_reinstall=true
|
||||||
|
|
||||||
|
# Move last setup log to backup
|
||||||
|
mv $setup_log $setup_log.bak
|
||||||
|
fi
|
||||||
|
|
||||||
source ./so-functions
|
source ./so-functions
|
||||||
source ./so-common-functions
|
source ./so-common-functions
|
||||||
source ./so-whiptail
|
source ./so-whiptail
|
||||||
source ./so-variables
|
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
setup_type=$1
|
setup_type=$1
|
||||||
@@ -54,12 +63,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -f $setup_log ]]; then
|
|
||||||
is_reinstall=true
|
|
||||||
|
|
||||||
# Move last setup log to backup
|
|
||||||
mv $setup_log $setup_log.bak
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Begin Installation pre-processing
|
# Begin Installation pre-processing
|
||||||
parse_install_username
|
parse_install_username
|
||||||
|
|||||||
Reference in New Issue
Block a user