diff --git a/.vscode/sftp.json b/.vscode/sftp.json deleted file mode 100644 index 7de9a4d41..000000000 --- a/.vscode/sftp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "10.66.166.230", - "host": "10.66.166.230", - "protocol": "sftp", - "port": 22, - "username": "onionuser", - "remotePath": "/home/onionuser/so/", - "uploadOnSave": false, - "useTempFile": false, - "autoDelete": true, - "openSsh": false -} diff --git a/setup/so-functions b/setup/so-functions index e3307bade..d233b3cb4 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1893,14 +1893,6 @@ securityonion_repo() { repo_sync_local() { # Sync the repo from the the SO repo locally. # Check for reposync - REPOSYNC=$(rpm -qa | grep createrepo | wc -l) - if [[ ! "$REPOSYNC" -gt 0 ]]; then - # Install reposync - info "Installing createrepo" - logCmd "yum -y install yum-utils createrepo" - else - info "We have what we need to sync" - fi info "Backing up old repos" mkdir -p /nsm/repo mkdir -p /root/reposync_cache @@ -1924,6 +1916,15 @@ repo_sync_local() { echo "gpgcheck=1" >> /root/repodownload.conf echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf + REPOSYNC=$(rpm -qa | grep createrepo | wc -l) + if [[ ! "$REPOSYNC" -gt 0 ]]; then + # Install reposync + info "Installing createrepo" + logCmd "yum -y install -c /root/repodownload.conf yum-utils createrepo" + else + info "We have what we need to sync" + fi + logCmd "reposync --norepopath -n -g -l -d -m -c /root/repodownload.conf -r securityonionsync --download-metadata -p /nsm/repo/"