fix conflict

This commit is contained in:
Mike Reeves
2023-02-22 10:20:14 -05:00
104 changed files with 2331 additions and 1784 deletions

View File

@@ -339,6 +339,33 @@ collect_hostname_validate() {
done
}
collect_idh_preferences() {
IDH_MGTRESTRICT='False'
whiptail_idh_preferences
if [[ "$idh_preferences" != "" ]]; then IDH_MGTRESTRICT='True'; fi
}
collect_idh_services() {
whiptail_idh_services
case "$IDH_SERVICES" in
'Linux Webserver (NAS Skin)')
IDH_SERVICES='"HTTP","FTP","SSH"'
;;
'MySQL Server')
IDH_SERVICES='"MYSQL","SSH"'
;;
'MSSQL Server')
IDH_SERVICES='"MSSQL","VNC'
;;
'Custom')
whiptail_idh_services_custom
IDH_SERVICES=$(echo "$IDH_SERVICES" | tr '[:blank:]' ',' )
;;
esac
}
collect_int_ip_mask() {
whiptail_management_interface_ip_mask
@@ -1207,7 +1234,8 @@ generate_passwords(){
PLAYBOOKDBPASS=$(get_random_value)
PLAYBOOKADMINPASS=$(get_random_value)
PLAYBOOKAUTOMATIONPASS=$(get_random_value)
GRAFANAPASS=$(get_random_value)
INFLUXPASS=$(get_random_value)
INFLUXTOKEN=$(head -c 64 /dev/urandom | base64 --wrap=0)
SENSORONIKEY=$(get_random_value)
KRATOSKEY=$(get_random_value)
REDISPASS=$(get_random_value)
@@ -1359,10 +1387,8 @@ manager_pillar() {
touch $adv_manager_pillar_file
title "Create the manager pillar"
if [[ $is_import ]]; then
GRAFANA=0
PLAYBOOK=0
else
GRAFANA=1
PLAYBOOK=1
fi
printf '%s\n'\
@@ -1370,7 +1396,6 @@ manager_pillar() {
" proxy: '$so_proxy'"\
" no_proxy: '$no_proxy_string'"\
" elastalert: 1"\
" grafana: $GRAFANA"\
" playbook: $PLAYBOOK"\
"" > "$manager_pillar_file"
}
@@ -1867,6 +1892,8 @@ drop_install_options() {
echo "LSHOSTNAME=$HOSTNAME" >> /opt/so/install.txt
echo "LSHEAP=$LS_HEAP_SIZE" >> /opt/so/install.txt
echo "CPUCORES=$num_cpu_cores" >> /opt/so/install.txt
echo "IDH_MGTRESTRICT=$IDH_MGTRESTRICT" >> /opt/so/install.txt
echo "IDH_SERVICES=$IDH_SERVICES" >> /opt/so/install.txt
}
remove_package() {
@@ -2033,7 +2060,8 @@ secrets_pillar(){
" playbook_admin: $PLAYBOOKADMINPASS"\
" playbook_automation: $PLAYBOOKAUTOMATIONPASS"\
" playbook_automation_api_key: "\
" grafana_admin: $GRAFANAPASS" > $local_salt_dir/pillar/secrets.sls
" influx_pass: $INFLUXPASS"\
" influx_token: $INFLUXTOKEN" > $local_salt_dir/pillar/secrets.sls
fi
}