mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[refactor] Set $REDIRECTIT outside of subshell
This commit is contained in:
@@ -871,6 +871,17 @@ get_redirect() {
|
|||||||
if [ "$REDIRECTINFO" = "OTHER" ]; then
|
if [ "$REDIRECTINFO" = "OTHER" ]; then
|
||||||
whiptail_set_redirect_host
|
whiptail_set_redirect_host
|
||||||
fi
|
fi
|
||||||
|
case $REDIRECTINFO in
|
||||||
|
'IP')
|
||||||
|
export REDIRECTIT="$MAINIP"
|
||||||
|
;;
|
||||||
|
'HOSTNAME')
|
||||||
|
export REDIRECTIT="$HOSTNAME"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export REDIRECTIT="$REDIRECTHOST"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
got_root() {
|
got_root() {
|
||||||
@@ -938,18 +949,6 @@ manager_pillar() {
|
|||||||
" mtu: $MTU" >> "$pillar_file"
|
" mtu: $MTU" >> "$pillar_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $REDIRECTINFO in
|
|
||||||
'IP')
|
|
||||||
export REDIRECTIT="$MAINIP"
|
|
||||||
;;
|
|
||||||
'HOSTNAME')
|
|
||||||
export REDIRECTIT=$HOSTNAME
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
export REDIRECTIT="$REDIRECTHOST"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
" elastalert: 1"\
|
" elastalert: 1"\
|
||||||
" nids_rules: $RULESETUP"\
|
" nids_rules: $RULESETUP"\
|
||||||
|
|||||||
@@ -378,8 +378,6 @@ if [[ $is_minion ]]; then
|
|||||||
copy_ssh_key >> $setup_log 2>&1
|
copy_ssh_key >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Begin install
|
# Begin install
|
||||||
{
|
{
|
||||||
# Set initial percentage to 0
|
# Set initial percentage to 0
|
||||||
@@ -633,6 +631,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||||
|
echo "Running so-allow -${ALLOW_ROLE} for ${ALLOW_CIDR}"
|
||||||
IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user