Browse Source

Nginx official repo, comment

Ernesto Nicolás Carrea 5 years ago
parent
commit
4e0068e9e0
1 changed files with 11 additions and 6 deletions
  1. 11 6
      bin/module/nginx/install.inc

+ 11 - 6
bin/module/nginx/install.inc

@@ -20,12 +20,17 @@ hestia_module_nginx_install() {
         wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
         APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev/null 2>&1
     elif [ "$OS_BASE" = 'rhel' ]; then
-        nrepo="/etc/yum.repos.d/nginx.repo"
-        echo "[nginx]" > $nrepo
-        echo "name=nginx repo" >> $nrepo
-        echo "baseurl=https://nginx.org/packages/centos/$release/\$basearch/" >> $nrepo
-        echo "gpgcheck=0" >> $nrepo
-        echo "enabled=1" >> $nrepo
+        cat > "/etc/yum.repos.d/nginx.repo" <<EOL
+# This file is auto generated. Do not edit this file. Changes will be overwriten
+# Run 'hestia module nginx info' or visit http://hestiacp.com for more info.
+[nginx-stable]
+name=nginx stable repo
+baseurl=http://nginx.org/packages/centos/\$releasever/\$basearch/
+gpgcheck=1
+enabled=1
+gpgkey=https://nginx.org/keys/nginx_signing.key
+module_hotfixes=true
+EOL
     fi
 
     osal_package_preinstall