JOBS - fixed some job script and right temp nginx reload

This commit is contained in:
bunkerity 2020-12-16 18:56:11 +01:00
parent bb0f46d8af
commit 3f7e2c54b3
No known key found for this signature in database
GPG Key ID: 654FFF51CEF7CC47
5 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
daemon on;
pid /tmp/nginx-temp.pid;
events {

View File

@ -78,8 +78,8 @@ rsyslogd
crond
# start nginx
if [ -f "/tmp/nginx.pid" ] ; then
nginx -s quit
if [ -f "/tmp/nginx-temp.pid" ] ; then
nginx -c /etc/nginx/nginx-temp.conf -s quit
fi
echo "[*] Running nginx ..."
su -s "/usr/sbin/nginx" nginx

View File

@ -19,7 +19,7 @@ done
echo -e "map \$http_referer \$bad_referrer { hostnames; default no; $DATA }" > /tmp/map-referrer.conf
# check number of lines
lines="$(wc -l /etc/nginx/map-referrer.conf | cut -d ' ' -f 1)"
lines="$(wc -l /tmp/map-referrer.conf | cut -d ' ' -f 1)"
if [ "$lines" -gt 1 ] ; then
mv /tmp/map-referrer.conf /etc/nginx/map-referrer.conf
job_log "[BLACKLIST] referrers list updated ($lines entries)"

View File

@ -21,7 +21,7 @@ DATA_ESCAPED=$(echo "$DATA" | sed 's: :\\\\ :g' | sed 's:\\\\ yes;: yes;:g' | se
echo -e "map \$http_user_agent \$bad_user_agent { default no; $DATA_ESCAPED }" > /tmp/map-user-agent.conf
# check number of lines
lines="$(wc -l /etc/nginx/map-user-agent.conf | cut -d ' ' -f 1)"
lines="$(wc -l /tmp/map-user-agent.conf | cut -d ' ' -f 1)"
if [ "$lines" -gt 1 ] ; then
mv /tmp/map-user-agent.conf /etc/nginx/map-user-agent.conf
job_log "[BLACKLIST] user-agent list updated ($lines entries)"

View File

@ -14,7 +14,7 @@
{% set color = "danger" %}
{% endif %}
<div class="col row-cols-1 row-cols-md-3">
<div class="col col-1 row-col-md-3 mx-auto">
<div class="card border-{{ color }} mb-3" style="max-width: 80rem;">
<div class="card-header border-{{ color }} bg-{{ color }}">{{ instance["name"] }}</div>
<div class="card-body text-dark">