Fix Desktop ISO install

This commit is contained in:
Mike Reeves
2023-07-28 09:46:27 -04:00
parent a1fa87c150
commit bb2a1b9521
2 changed files with 78 additions and 48 deletions

View File

@@ -117,52 +117,6 @@ if [[ "$setup_type" == 'iso' ]]; then
fi
fi
# Check to see if this is an desktop install. If it is let's run things differently
if [[ $is_desktop ]]; then
title "This is a desktop install"
# Make sure it's CentOS or Rocky Linux
if [[ $is_rpm ]]; then
info "Security Onion Desktop is supported on this OS."
else
info "Security Onion Desktop is not supported on this OS."
exit 1
fi
if ! whiptail_desktop_install; then
if [[ $is_desktop_iso ]]; then
if whiptail_desktop_nongrid_iso; then
# Remove setup from auto launching
parse_install_username
sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1
info "Enabling graphical interface and setting it to load at boot"
systemctl set-default graphical.target
startx
exit 0
else
# Abort!
exit 0
fi
else
if whiptail_desktop_nongrid_network; then
info ""
info ""
info "Kicking off the automated setup of the Security Onion Desktop. This can take a while depending on your network connection."
info ""
info ""
desktop_salt_local
else
# Abort!
exit 0
fi
fi
fi
# If you got this far then you want to join the grid
is_minion=true
fi
if ! [ -f $install_opt_file ] && [ -d /root/manager_setup/securityonion ] && [[ $(pwd) != /root/manager_setup/securityonion/setup ]]; then
exec bash /root/manager_setup/securityonion/setup/so-setup "${original_args[@]}"
fi
@@ -366,6 +320,55 @@ fi
# Process the install type
process_installtype
# Check to see if this is an desktop install. If it is let's run things differently
if [[ $is_desktop ]]; then
title "This is a desktop install"
# Make sure it's oracle
if [[ $is_oracle ]]; then
info "Security Onion Desktop is supported on this OS."
else
info "Security Onion Desktop is not supported on this OS."
exit 1
fi
# if ! whiptail_desktop_install; then
if [[ $is_desktop_iso ]]; then
if whiptail_desktop_nongrid_iso; then
# Remove setup from auto launching
parse_install_username
sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1
securityonion_repo
info "Enabling graphical interface and setting it to load at boot"
systemctl set-default graphical.target
startx
exit 0
else
# Abort!
exit 0
fi
else
if whiptail_desktop_nongrid_network; then
info ""
info ""
info "Kicking off the automated setup of the Security Onion Desktop. This can take a while depending on your network connection."
info ""
info ""
desktop_salt_local
else
# Abort!
exit 0
fi
fi
# fi
# If you got this far then you want to join the grid
is_minion=true
fi
# If this is not an automated install prompt
if ! [[ -f $install_opt_file ]]; then
# If you are a manager ask ALL the manager things here. I know there is code re-use but this makes it easier to add new roles