mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add some Ubuntu
This commit is contained in:
@@ -964,6 +964,11 @@ detect_os() {
|
|||||||
OS=ubuntu
|
OS=ubuntu
|
||||||
if grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
|
if grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
|
||||||
OSVER=focal
|
OSVER=focal
|
||||||
|
UBVER=20.04
|
||||||
|
is_ubuntu=true
|
||||||
|
elif grep -q "UBUNTU_CODENAME=jammy" /etc/os-release; then
|
||||||
|
OSVER=jammy
|
||||||
|
UBVER=22.04
|
||||||
is_ubuntu=true
|
is_ubuntu=true
|
||||||
else
|
else
|
||||||
info "We do not support your current version of Ubuntu."
|
info "We do not support your current version of Ubuntu."
|
||||||
@@ -2023,8 +2028,8 @@ saltify() {
|
|||||||
#logCmd "wget -q --inet4-only -O /opt/so/gpg/SALTSTACK-GPG-KEY.pub https://repo.securityonion.net/file/securityonion-repo/ubuntu/20.04/amd64/salt/SALTSTACK-GPG-KEY.pub"
|
#logCmd "wget -q --inet4-only -O /opt/so/gpg/SALTSTACK-GPG-KEY.pub https://repo.securityonion.net/file/securityonion-repo/ubuntu/20.04/amd64/salt/SALTSTACK-GPG-KEY.pub"
|
||||||
logCmd "wget -q --inet4-only -O /etc/apt/keyrings/docker.pub https://download.docker.com/linux/ubuntu/gpg"
|
logCmd "wget -q --inet4-only -O /etc/apt/keyrings/docker.pub https://download.docker.com/linux/ubuntu/gpg"
|
||||||
|
|
||||||
logCmd "curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/20.04/amd64/minor/$SALTVERSION/SALT-PROJECT-GPG-PUBKEY-2023.gpg"
|
logCmd "curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/$UBVER/amd64/minor/$SALTVERSION/SALT-PROJECT-GPG-PUBKEY-2023.gpg"
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg] https://repo.saltproject.io/salt/py3/ubuntu/20.04/amd64/minor/$SALTVERSION/ focal main" | sudo tee /etc/apt/sources.list.d/salt.list
|
echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg] https://repo.saltproject.io/salt/py3/ubuntu/$UBVER/amd64/minor/$SALTVERSION/ focal main" | sudo tee /etc/apt/sources.list.d/salt.list
|
||||||
logCmd "apt-key add /etc/apt/keyrings/salt-archive-keyring-2023.gpg"
|
logCmd "apt-key add /etc/apt/keyrings/salt-archive-keyring-2023.gpg"
|
||||||
|
|
||||||
#logCmd "apt-key add /opt/so/gpg/SALTSTACK-GPG-KEY.pub"
|
#logCmd "apt-key add /opt/so/gpg/SALTSTACK-GPG-KEY.pub"
|
||||||
@@ -2045,7 +2050,7 @@ saltify() {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_rocky || $is_centos ]]; then
|
if [[ $is_rocky || $is_centos || $is_ubuntu ]]; then
|
||||||
if [[ $waitforstate ]]; then
|
if [[ $waitforstate ]]; then
|
||||||
# install all for a manager
|
# install all for a manager
|
||||||
logCmd "dnf -y install salt-$SALTVERSION salt-master-$SALTVERSION salt-minion-$SALTVERSION"
|
logCmd "dnf -y install salt-$SALTVERSION salt-master-$SALTVERSION salt-minion-$SALTVERSION"
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ whiptail_install_type() {
|
|||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
# What kind of install are we doing?
|
# What kind of install are we doing?
|
||||||
if [[ $is_rocky || $is_centos ]]; then
|
# if [[ $is_rocky || $is_centos ]]; then
|
||||||
install_type=$(whiptail --title "$whiptail_title" --menu \
|
install_type=$(whiptail --title "$whiptail_title" --menu \
|
||||||
"What kind of installation would you like to do?\n\nFor more information, please see:\n$DOC_BASE_URL/architecture.html" 18 65 5 \
|
"What kind of installation would you like to do?\n\nFor more information, please see:\n$DOC_BASE_URL/architecture.html" 18 65 5 \
|
||||||
"IMPORT" "Import PCAP or log files " \
|
"IMPORT" "Import PCAP or log files " \
|
||||||
@@ -533,14 +533,14 @@ whiptail_install_type() {
|
|||||||
"OTHER" "Other install types" \
|
"OTHER" "Other install types" \
|
||||||
3>&1 1>&2 2>&3
|
3>&1 1>&2 2>&3
|
||||||
)
|
)
|
||||||
elif [[ $is_ubuntu ]]; then
|
# elif [[ $is_ubuntu ]]; then
|
||||||
install_type=$(whiptail --title "$whiptail_title" --menu \
|
# install_type=$(whiptail --title "$whiptail_title" --menu \
|
||||||
"What kind of installation would you like to do?\n\nFor more information, please see:\n$DOC_BASE_URL/architecture.html" 18 65 5 \
|
# "What kind of installation would you like to do?\n\nFor more information, please see:\n$DOC_BASE_URL/architecture.html" 18 65 5 \
|
||||||
"DISTRIBUTED" "Distributed install submenu " \
|
# "DISTRIBUTED" "Distributed install submenu " \
|
||||||
"OTHER" "Other install types" \
|
# "OTHER" "Other install types" \
|
||||||
3>&1 1>&2 2>&3
|
# 3>&1 1>&2 2>&3
|
||||||
)
|
# )
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
@@ -563,18 +563,18 @@ whiptail_install_type_dist() {
|
|||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
if [[ $is_rocky || $is_centos ]]; then
|
# if [[ $is_rocky || $is_centos ]]; then
|
||||||
dist_option=$(whiptail --title "$whiptail_title" --menu "Do you want to start a new deployment or join this box to \nan existing deployment?" 11 75 2 \
|
dist_option=$(whiptail --title "$whiptail_title" --menu "Do you want to start a new deployment or join this box to \nan existing deployment?" 11 75 2 \
|
||||||
"New Deployment " "Create a new Security Onion deployment" \
|
"New Deployment " "Create a new Security Onion deployment" \
|
||||||
"Existing Deployment " "Join to an existing Security Onion deployment " \
|
"Existing Deployment " "Join to an existing Security Onion deployment " \
|
||||||
3>&1 1>&2 2>&3
|
3>&1 1>&2 2>&3
|
||||||
)
|
)
|
||||||
elif [[ $is_ubuntu ]]; then
|
# elif [[ $is_ubuntu ]]; then
|
||||||
dist_option=$(whiptail --title "$whiptail_title" --menu "Since this is Ubuntu, this box can only be connected to \nan existing deployment." 11 75 2 \
|
# dist_option=$(whiptail --title "$whiptail_title" --menu "Since this is Ubuntu, this box can only be connected to \nan existing deployment." 11 75 2 \
|
||||||
"Existing Deployment " "Join to an existing Security Onion deployment " \
|
# "Existing Deployment " "Join to an existing Security Onion deployment " \
|
||||||
3>&1 1>&2 2>&3
|
# 3>&1 1>&2 2>&3
|
||||||
)
|
# )
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|||||||
Reference in New Issue
Block a user