mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Fix manager cron logic
This commit is contained in:
@@ -1963,14 +1963,12 @@ securityonion_repo() {
|
|||||||
fi
|
fi
|
||||||
if [[ $is_rpm ]]; then logCmd "dnf repolist all"; fi
|
if [[ $is_rpm ]]; then logCmd "dnf repolist all"; fi
|
||||||
if [[ $waitforstate ]]; then
|
if [[ $waitforstate ]]; then
|
||||||
if [[ ! $is_airgap ]]; then
|
|
||||||
if [[ $is_rpm ]]; then
|
if [[ $is_rpm ]]; then
|
||||||
# Build the repo locally so we can use it
|
# Build the repo locally so we can use it
|
||||||
echo "Syncing Repos"
|
echo "Syncing Repos"
|
||||||
repo_sync_local
|
repo_sync_local
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repo_sync_local() {
|
repo_sync_local() {
|
||||||
@@ -1978,7 +1976,7 @@ repo_sync_local() {
|
|||||||
if [[ $is_supported ]]; then
|
if [[ $is_supported ]]; then
|
||||||
# Sync the repo from the the SO repo locally.
|
# Sync the repo from the the SO repo locally.
|
||||||
# Check for reposync
|
# Check for reposync
|
||||||
info "Backing up old repos"
|
info "Adding Repo Download Configuration"
|
||||||
mkdir -p /nsm/repo
|
mkdir -p /nsm/repo
|
||||||
mkdir -p /opt/so/conf/reposync/cache
|
mkdir -p /opt/so/conf/reposync/cache
|
||||||
echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9" > /opt/so/conf/reposync/mirror.txt
|
echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9" > /opt/so/conf/reposync/mirror.txt
|
||||||
@@ -2002,10 +2000,10 @@ repo_sync_local() {
|
|||||||
if [[ ! $is_airgap ]]; then
|
if [[ ! $is_airgap ]]; then
|
||||||
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
|
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
|
||||||
logCmd "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/"
|
logCmd "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/"
|
||||||
fi
|
|
||||||
|
|
||||||
# After the download is complete run createrepo
|
# After the download is complete run createrepo
|
||||||
create_repo
|
create_repo
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
# Add the proper repos for unsupported stuff
|
# Add the proper repos for unsupported stuff
|
||||||
echo "Adding Repos"
|
echo "Adding Repos"
|
||||||
|
|||||||
Reference in New Issue
Block a user