mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Provide option to skip reboot after setup completes
This commit is contained in:
@@ -67,6 +67,7 @@ PLAYBOOK=1
|
|||||||
REDIRECTINFO=IP
|
REDIRECTINFO=IP
|
||||||
RULESETUP=ETOPEN
|
RULESETUP=ETOPEN
|
||||||
# SHARDCOUNT=
|
# SHARDCOUNT=
|
||||||
|
SKIP_REBOOT=1
|
||||||
SOREMOTEPASS1=onionuser
|
SOREMOTEPASS1=onionuser
|
||||||
SOREMOTEPASS2=onionuser
|
SOREMOTEPASS2=onionuser
|
||||||
STRELKA=1
|
STRELKA=1
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ check_admin_pass() {
|
|||||||
check_pass_match "$ADMINPASS1" "$ADMINPASS2" "APMATCH"
|
check_pass_match "$ADMINPASS1" "$ADMINPASS2" "APMATCH"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_hive_init_then_reboot() {
|
check_hive_init() {
|
||||||
|
|
||||||
wait_for_file /opt/so/state/thehive.txt 20 5
|
wait_for_file /opt/so/state/thehive.txt 20 5
|
||||||
local return_val=$?
|
local return_val=$?
|
||||||
@@ -203,7 +203,6 @@ check_hive_init_then_reboot() {
|
|||||||
|
|
||||||
docker stop so-thehive
|
docker stop so-thehive
|
||||||
docker rm so-thehive
|
docker rm so-thehive
|
||||||
shutdown -r now
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_network_manager_conf() {
|
check_network_manager_conf() {
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ while [[ $# -gt 0 ]]; do
|
|||||||
export ALLOW_ROLE="${arg#*=}";;
|
export ALLOW_ROLE="${arg#*=}";;
|
||||||
"--allow-cidr="* )
|
"--allow-cidr="* )
|
||||||
export ALLOW_CIDR="${arg#*=}";;
|
export ALLOW_CIDR="${arg#*=}";;
|
||||||
|
"--skip-reboot" )
|
||||||
|
export SKIP_REBOOT=1
|
||||||
* )
|
* )
|
||||||
if [[ "$arg" == "--"* ]]; then
|
if [[ "$arg" == "--"* ]]; then
|
||||||
echo "Invalid option"
|
echo "Invalid option"
|
||||||
@@ -563,11 +565,12 @@ if [[ "$success" = 0 ]]; then
|
|||||||
so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
if [[ $THEHIVE == 1 ]]; then
|
if [[ $THEHIVE == 1 ]]; then
|
||||||
check_hive_init_then_reboot
|
check_hive_init
|
||||||
else
|
|
||||||
shutdown -r now
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
whiptail_setup_failed
|
whiptail_setup_failed
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $SKIP_REBOOT ]]; then
|
||||||
shutdown -r now
|
shutdown -r now
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user