File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -19,25 +19,27 @@ debug_mode
19
19
# Check if root
20
20
root_check
21
21
22
- # Replace old Nginx with new
23
- install_if_not ppa-purge
24
- ppa-purge nginx/stable
25
- rm -f /etc/apt/sources.list.d/nginx*
26
- check_command yes | add-apt-repository ppa:ondrej/nginx
27
- apt update -q4 && spinner_loading
28
- install_if_not nginx
29
- systemctl stop nginx
30
- systemctl start nginx
31
- systemctl enable nginx
32
- apt-get purge ppa-purge -y
33
- apt-get autoremove -y
22
+ # Replace old Nginx with Brotli supported Nginx
23
+ if [ ! -f /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf ]
24
+ then
25
+ install_if_not ppa-purge
26
+ ppa-purge nginx/stable
27
+ rm -f /etc/apt/sources.list.d/nginx*
28
+ check_command yes | add-apt-repository ppa:ondrej/nginx
29
+ apt update -q4 && spinner_loading
30
+ install_if_not nginx
31
+ systemctl stop nginx
32
+ systemctl start nginx
33
+ systemctl enable nginx
34
+ apt-get purge ppa-purge -y
35
+ apt-get autoremove -y
36
+ else
37
+ exit
38
+ fi
34
39
35
40
# Enable Brotli
36
41
install_if_not libnginx-mod-brotli
37
- if ! [ -f /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf ]
38
- then
39
- echo " load_module modules/ngx_http_brotli_filter_module.so;" > /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf
40
- fi
42
+ echo " load_module modules/ngx_http_brotli_filter_module.so;" > /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf
41
43
42
44
# Enable Brotli in config
43
45
rm -f /etc/nginx/nginx.conf
You can’t perform that action at this time.
0 commit comments