diff --git a/run.sh b/run.sh index a611829..864b4f5 100755 --- a/run.sh +++ b/run.sh @@ -290,7 +290,7 @@ update_debug() { # Install required packages install_packages() { dnf config-manager --set-enabled crb - dnf update && + dnf update -y && yum -y install vim && yum -y install epel-release && yum -y install bind-utils && @@ -416,6 +416,12 @@ server { server_name $PUB_IP; charset utf-8; client_max_body_size 75M; + server_tokens off; + + access_log /var/log/nginx/$APP.access.log; + error_log /var/log/nginx/$APP.error.log; + + location = /favicon.ico { access_log off; log_not_found off;} location /media { alias /home/$USERNAME/$APP/media; } @@ -471,17 +477,13 @@ create_service_file() { ====== [Unit] Description=$DESCRIPTION -After=syslog.target +After=network.target [Service] -ExecStart=/usr/local/bin/$SERVICE.sh -RuntimeDirectory=uwsgi -Restart=always -KillSignal=SIGQUIT -Type=notify -StandardError=syslog -NotifyAccess=all User=$USERNAME +Group=nginx +WorkingDirectory=/home/$USERNAME/$APP +ExecStart=/usr/local/bin/$SERVICE.sh [Install] WantedBy=multi-user.target @@ -494,10 +496,10 @@ fi # Criar o script que executa o modo Emperor do uWSGI # Create the script called by systemctl service -create_script_emperor() { +create_script_executor() { cat > /usr/local/bin/$SERVICE.sh <