mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-02 02:41:51 +02:00
Re-exec soup with 3/main branch when running on 3.X.X
This commit is contained in:
@@ -317,11 +317,7 @@ clone_to_tmp() {
|
||||
# Make a temp location for the files
|
||||
mkdir -p /tmp/sogh
|
||||
cd /tmp/sogh
|
||||
if [[ "$INSTALLEDVERSION" == 3.* ]]; then
|
||||
SOUP_BRANCH="-b 3/main"
|
||||
else
|
||||
SOUP_BRANCH="-b 2.4/main"
|
||||
fi
|
||||
SOUP_BRANCH="-b 2.4/main"
|
||||
if [ -n "$BRANCH" ]; then
|
||||
SOUP_BRANCH="-b $BRANCH"
|
||||
fi
|
||||
@@ -2132,6 +2128,12 @@ failed_soup_restore_items() {
|
||||
main() {
|
||||
trap 'check_err $?' EXIT
|
||||
|
||||
# If running 3.X.X, re-launch soup using the 3/main branch
|
||||
if [[ "$INSTALLEDVERSION" == 3.* && "$BRANCH" != "3/main" ]]; then
|
||||
echo "Detected Security Onion $INSTALLEDVERSION. Switching to 3/main branch."
|
||||
exec env BRANCH=3/main soup "$@"
|
||||
fi
|
||||
|
||||
if [ -n "$BRANCH" ]; then
|
||||
echo "SOUP will use the $BRANCH branch."
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user