Skip to content

Commit 292d5aa

Browse files
authored
Remove tee append
1 parent b9e6efb commit 292d5aa

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

install.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ http {
6969
##
7070
7171
include /etc/nginx/sites-enabled/*;
72-
}" | sudo tee -a "/etc/nginx/nginx.conf"
72+
}" | sudo tee "/etc/nginx/nginx.conf"
7373
sudo mkdir -p /var/log/nginx
7474
sudo touch /var/log/nginx/access.log
7575
sudo chmod 777 /var/log/nginx/access.log
@@ -92,7 +92,7 @@ sudo echo "location ~ \.php\$ {
9292
fastcgi_param PHP_ADMIN_VALUE \"open_basedir=\$document_root/:/usr/lib/php/:/tmp/\";
9393
9494
fastcgi_pass unix:/var/run/php/php-fpm.sock;
95-
}" | sudo tee -a "/etc/nginx/php7.conf"
95+
}" | sudo tee "/etc/nginx/php7.conf"
9696
sudo echo "# WordPress single site rules.
9797
# Designed to be included in any server {} block.
9898
# Upstream to abstract backend connection(s) for php
@@ -119,15 +119,15 @@ rewrite /wp-admin\$ \$scheme://\$host\$uri/ permanent;
119119
# Directives to send expires headers and turn off 404 error logging.
120120
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)\$ {
121121
access_log off; log_not_found off; expires max;
122-
}" | sudo tee -a "/etc/nginx/global/wordpress.conf"
122+
}" | sudo tee "/etc/nginx/global/wordpress.conf"
123123
sudo echo "server {
124124
listen 80 default_server;
125125
root /var/www;
126126
index index.html index.htm index.php;
127127
server_name localhost;
128128
include php7.conf;
129129
include global/wordpress.conf;
130-
}" | sudo tee -a "/etc/nginx/sites-available/default"
130+
}" | sudo tee "/etc/nginx/sites-available/default"
131131
sudo echo "types {
132132
text/html html htm shtml;
133133
text/css css;
@@ -175,7 +175,7 @@ sudo echo "types {
175175
video/x-ms-wmv wmv;
176176
video/x-ms-asf asx asf;
177177
video/x-mng mng;
178-
}" | sudo tee -a "/etc/nginx/mime.types"
178+
}" | sudo tee "/etc/nginx/mime.types"
179179
sudo echo "fastcgi_param QUERY_STRING \$query_string;
180180
fastcgi_param REQUEST_METHOD \$request_method;
181181
fastcgi_param CONTENT_TYPE \$content_type;
@@ -199,7 +199,7 @@ fastcgi_param SERVER_PORT \$server_port;
199199
fastcgi_param SERVER_NAME \$server_name;
200200
201201
# PHP only, required if PHP was built with --enable-force-cgi-redirect
202-
fastcgi_param REDIRECT_STATUS 200;" | sudo tee -a "/etc/nginx/fastcgi_params"
202+
fastcgi_param REDIRECT_STATUS 200;" | sudo tee "/etc/nginx/fastcgi_params"
203203
sudo ln -sfnv /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
204204
sudo chown -R $(whoami):www-data /var/www
205205

@@ -209,6 +209,7 @@ sudo add-apt-repository --yes ppa:ondrej/php
209209
sudo apt update
210210
sudo apt install php7.4 php7.4-curl php7.4-redis php7.4-xml php7.4-fpm php7.4-igbinary php7.4-json php7.4-dev php-pear
211211
sudo systemctl enable --now php-fpm
212+
sudo sed -i -e "s/user = www-data/$USER/g" /etc/php/7.4/fpm/pool.d/www.conf
212213
echo "${boldgreen}PHP installed and running.${txtreset}"
213214

214215
echo "${yellow}Installing MariaDB.${txtreset}"

0 commit comments

Comments
 (0)