Navigation Menu

Skip to content

Commit

Permalink
prevent nginx epel yum package install add to excludes list in 123.09…
Browse files Browse the repository at this point in the history
…beta01

for existing centmin mod installs, ensure nginx epel yum package is added to epel yum repo config file's exclude listing
  • Loading branch information
centminmod committed Feb 22, 2017
1 parent 1a9cdda commit 2516ef2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions inc/cpcheck.inc
Expand Up @@ -45,6 +45,16 @@ fixnodejs_epel() {
fi
}

fixnginx_epel() {
# prevent nginx install via epel yum repo
if [[ -f /etc/yum.repos.d/epel.repo && "$(grep '^exclude=' /etc/yum.repos.d/epel.repo | grep nginx > /dev/null 2>&1; echo $?)" = '1' ]]; then
if [[ "$(grep '^exclude=' /etc/yum.repos.d/epel.repo > /dev/null 2>&1; echo $?)" = '0' ]]; then
NEW_NGINXEXCLUDES=$(echo "$(grep '^exclude=' /etc/yum.repos.d/epel.repo) nginx")
sed -i "s|^exclude=.*|$NEW_NGINXEXCLUDES|" /etc/yum.repos.d/epel.repo
fi
fi
}

fixclamav_epel() {
# prevent clamav-devel install by epel in favour of rpmforge version
# https://community.centminmod.com/posts/38359/
Expand Down Expand Up @@ -1463,6 +1473,7 @@ if [[ "$INITIALINSTALL" != [yY] ]]; then
fixphpfpm_httpproxy
fixlibmysqlclient_symlink
fixnodejs_epel
fixnginx_epel
fixclamav_epel
nano_highlight
checkwoff
Expand Down

0 comments on commit 2516ef2

Please sign in to comment.