mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Correct logic for service check + bash trap
This commit is contained in:
@@ -1404,7 +1404,7 @@ reinstall_init() {
|
|||||||
local pid=$!
|
local pid=$!
|
||||||
|
|
||||||
local count=0
|
local count=0
|
||||||
while check_service_status "$service"; do
|
while ! (check_service_status "$service"); do
|
||||||
if [[ $count -gt $service_retry_count ]]; then
|
if [[ $count -gt $service_retry_count ]]; then
|
||||||
echo "Could not stop $service after 1 minute, exiting setup."
|
echo "Could not stop $service after 1 minute, exiting setup."
|
||||||
|
|
||||||
|
|||||||
@@ -485,14 +485,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Exit parent script if
|
# Exit parent script if
|
||||||
trap 'catch $? $LINENO' SIGUSR1
|
trap 'catch $LINENO' SIGUSR1
|
||||||
|
|
||||||
catch() {
|
catch() {
|
||||||
if [ "$1" != 0 ]; then
|
|
||||||
info "Fatal error occurred at $2 in so-setup, failing setup."
|
info "Fatal error occurred at $2 in so-setup, failing setup."
|
||||||
whiptail_setup_failed
|
whiptail_setup_failed
|
||||||
exit
|
exit
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Begin install
|
# Begin install
|
||||||
|
|||||||
Reference in New Issue
Block a user