mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
workaround for crontabs configured without $PATH
fixes: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/284
This commit is contained in:
parent
1811d264d7
commit
1541154f02
1 changed files with 3 additions and 1 deletions
|
@ -313,6 +313,7 @@ main() {
|
||||||
local REPO=https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master
|
local REPO=https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master
|
||||||
local file=globalblacklist.conf remote_dir=conf.d url= output= update= status= tmp= retval=
|
local file=globalblacklist.conf remote_dir=conf.d url= output= update= status= tmp= retval=
|
||||||
local nginx_path=$(find_binary nginx)
|
local nginx_path=$(find_binary nginx)
|
||||||
|
local pidof_path=$(find_binary pidof)
|
||||||
|
|
||||||
# require root
|
# require root
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
@ -358,7 +359,8 @@ main() {
|
||||||
# re-read nginx configuration
|
# re-read nginx configuration
|
||||||
if [ $retval = 0 ]; then
|
if [ $retval = 0 ]; then
|
||||||
|
|
||||||
if pidof nginx 1>/dev/null; then
|
# use full paths to workaround crontabs without $PATH configured
|
||||||
|
if $pidof_path nginx 1>/dev/null; then
|
||||||
|
|
||||||
$nginx_path -s reload 2>&1 >/dev/null
|
$nginx_path -s reload 2>&1 >/dev/null
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue