Replace /usr/sbin/nginx with nginx

This commit is contained in:
TheophileDiot 2022-11-19 20:51:10 +01:00
parent db35e575e3
commit c0efdf9c00
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ api.global.GET["^/ping$"] = function(api)
end
api.global.POST["^/reload$"] = function(api)
local status = os.execute("/usr/sbin/nginx -s reload")
local status = os.execute("nginx -s reload")
if status == 0 then
return api:response(ngx.HTTP_OK, "success", "reload successful")
end
@ -27,7 +27,7 @@ api.global.POST["^/reload$"] = function(api)
end
api.global.POST["^/stop$"] = function(api)
local status = os.execute("/usr/sbin/nginx -s quit")
local status = os.execute("nginx -s quit")
if status == 0 then
return api:response(ngx.HTTP_OK, "success", "stop successful")
end

View file

@ -11,7 +11,7 @@ log "ENTRYPOINT" "" "Starting BunkerWeb v$(cat /usr/share/bunkerweb/VERSIO
function trap_exit() {
log "ENTRYPOINT" "" "Catched stop operation"
log "ENTRYPOINT" "" "Stopping nginx ..."
/usr/sbin/nginx -s stop
nginx -s stop
}
trap "trap_exit" TERM INT QUIT