add desktop to grid

This commit is contained in:
m0duspwnens
2023-08-23 15:24:32 -04:00
parent f278056493
commit a885baf960
2 changed files with 17 additions and 9 deletions

View File

@@ -187,15 +187,9 @@ function add_logstash_to_minion() {
# Security Onion Desktop # Security Onion Desktop
function add_desktop_to_minion() { function add_desktop_to_minion() {
printf '%s\n'\ printf '%s\n'\
"host:"\
" mainint: '$MNIC'"\
"desktop:"\ "desktop:"\
" gui:"\ " gui:"\
" enabled: true"\ " enabled: true"\ >> $PILLARFILE
"sensoroni:"\
" enabled: True"\
" config:"\
" node_description: '${NODE_DESCRIPTION//\'/''}'" >> $PILLARFILE
} }
# Add basic host info to the minion file # Add basic host info to the minion file
@@ -556,6 +550,9 @@ function createRECEIVER() {
add_telegraf_to_minion add_telegraf_to_minion
} }
function createDESKTOP() {
add_desktop_to_minion
}
function testConnection() { function testConnection() {
retry 15 3 "salt '$MINION_ID' test.ping" True retry 15 3 "salt '$MINION_ID' test.ping" True

View File

@@ -333,7 +333,7 @@ if [[ $is_desktop ]]; then
exit 1 exit 1
fi fi
# if ! whiptail_desktop_install; then if ! whiptail_desktop_install; then
if [[ $is_desktop_iso ]]; then if [[ $is_desktop_iso ]]; then
if whiptail_desktop_nongrid_iso; then if whiptail_desktop_nongrid_iso; then
# Remove setup from auto launching # Remove setup from auto launching
@@ -365,7 +365,7 @@ if [[ $is_desktop ]]; then
exit 0 exit 0
fi fi
fi fi
# fi fi
# If you got this far then you want to join the grid # If you got this far then you want to join the grid
is_minion=true is_minion=true
@@ -574,6 +574,17 @@ if ! [[ -f $install_opt_file ]]; then
check_manager_connection check_manager_connection
set_minion_info set_minion_info
whiptail_end_settings whiptail_end_settings
elif [[ $is_desktop ]]; then
info "Setting up as node type desktop"
#check_requirements "desktop"
networking_needful
collect_mngr_hostname
add_mngr_ip_to_hosts
check_manager_connection
set_minion_info
whiptail_end_settings
fi fi
if [[ $waitforstate ]]; then if [[ $waitforstate ]]; then