File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,13 @@ rm -f /etc/apt/sources.list.d/nginx*
29
29
apt-get autoremove -y
30
30
31
31
# Enable Brotli
32
- install_of_not sponge
33
32
install_if_not libnginx-mod-brotli
34
- {
35
- echo " # https://docs.nginx.com/nginx/admin-guide/dynamic-modules/brotli/"
36
- echo " load_module modules/ngx_http_brotli_filter_module.so; # for compressing responses on-the-fly"
37
- echo " load_module modules/ngx_http_brotli_static_module.so; # for serving pre-compressed files"
38
- } | cat - " $NGINX_CONF " | sponge " $NGINX_CONF "
39
- apt-get purge sponge -y
33
+ if ! -[ /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf ]
34
+ then
35
+ echo " load_module modules/ngx_http_brotli_filter_module.so;" > /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf
36
+ fi
40
37
38
+ # Restart Nginx
41
39
if nginx -t
42
40
then
43
41
systemctl restart nginx
You can’t perform that action at this time.
0 commit comments