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
5 changed files with 6 additions and 5 deletions

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)"