fix check if repo file exists

This commit is contained in:
m0duspwnens
2021-04-07 13:51:40 -04:00
parent 425e5bc4c3
commit c4f0119276

View File

@@ -431,7 +431,7 @@ up_2.3.3X_to_2.3.50_repo() {
DELREPOS=('CentOS-Base' 'CentOS-CR' 'CentOS-Debuginfo' 'docker-ce' 'CentOS-fasttrack' 'CentOS-Media' 'CentOS-Sources' 'CentOS-Vault' 'CentOS-x86_64-kernel' 'epel' 'epel-testing' 'saltstack' 'wazuh')
for DELREPO in "${DELREPOS[@]}"; do
if [[ -f "$DELREPO" ]]; then
if [[ -f "/etc/yum.repos.d/$DELREPO.repo" ]]; then
echo "Deleting $DELREPO.repo"
rm -f "/etc/yum.repos.d/$DELREPO.repo"
fi