view host/stop_nginx.sh @ 2142:506cc134c0fe nginx_decoupled

fix
author Violet7
date Mon, 19 Jan 2026 20:59:31 -0800
parents c62dfd37545f
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