view host/stop_nginx.sh @ 2147:515e892cd4c2 nginx_decoupled tip

set nginx error log; rename luanhost_controller
author Violet7
date Wed, 21 Jan 2026 21:57:07 -0800
parents 506cc134c0fe
children
line wrap: on
line source

#!/bin/bash

set -e

PIDS=$(
	ps -eo pid,args |
		awk '/[n]ginx: master process/ {print $1}'
)

if [ -n "$PIDS" ]; then
	sudo kill -QUIT $PIDS
else
	echo "No nginx master process found, not attempting to stop."
fi