mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-24 01:43:11 +01:00
update update_repo function
This commit is contained in:
@@ -935,8 +935,19 @@ update_repo() {
|
||||
yum repolist
|
||||
fi
|
||||
elif [[ "$OS" == "ubuntu" ]]; then
|
||||
cp $UPDATE_DIR/salt/repo/client/files/ubuntu/$ubuntu_version/* /etc/apt/sources.list.d/
|
||||
apt-get update
|
||||
ubuntu_version=$(grep VERSION_ID /etc/os-release | awk -F '[ "]' '{print $2}')
|
||||
|
||||
if grep -q "UBUNTU_CODENAME=bionic" /etc/os-release; then
|
||||
OSVER=bionic
|
||||
elif grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
|
||||
OSVER=focal
|
||||
else
|
||||
echo "We do not support your current version of Ubuntu."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "deb http://repo.saltstack.com/py3/ubuntu/$ubuntu_version/amd64/archive/3004.1 $OSVER main" > /etc/apt/sources.list.d/saltstack.list
|
||||
apt-get update
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user