From 363673e29a7ffd37833c6d71b6cd39538618e855 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 21 Feb 2019 21:31:45 +0100 Subject: [PATCH] move webp mapping into the proper function --- install | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install b/install index 1fd3dba..c44bb2c 100644 --- a/install +++ b/install @@ -153,6 +153,14 @@ function wo_install_dep() apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-sodium php7.2-common php7.2-readline php7.2-redis php7.2-mysql php7.2-cli php7.2-memcache php7.2-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack memcached graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1 systemctl php7.2-fpm restart &>> /dev/null fi + + ### + # Webp mapping + ### + [ ! -f /etc/nginx/conf.d/webp.conf ] && { + mkdir -p /etc/nginx/conf.d + echo -e 'map $http_accept $webp_suffix {\n default "";\n "~*webp" ".webp";\n}\n' > /etc/nginx/conf.d/webp.conf + } } ### @@ -297,14 +305,6 @@ function wo_sync_db() sed -i 's/9170/9172/g' /etc/nginx/conf.d/upstream.conf &>> /dev/null fi - ### - # Webp mapping - ### - if [ ! -f /etc/nginx/conf.d/webp.conf ]; then - mkdir -p /etc/nginx/conf.d - echo -e 'map $http_accept $webp_suffix {\n default "";\n "~*webp" ".webp";\n}\n' > /etc/nginx/conf.d/webp.conf - fi - echo "UPDATE sites SET php_version = REPLACE(php_version, '5.6', '7.2');" | sqlite3 /var/lib/wo/dbase.db echo "UPDATE sites SET php_version = REPLACE(php_version, '7.0', '7.2');" | sqlite3 /var/lib/wo/dbase.db