Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8070e8

Browse files
committed
Add nginx.gracefulrestart
This calls `nginx.gracefulstop` (which blocks until Nginx has finishedin-flight requests) and then calls `nginx.start` before moving onto the nexthost.I need this to rollout some Nginx config changes that aren't picked up by agraceful reload (HUP). It can also be used to pick up OpenSSL lib upgrades.
1 parent32f06f6 commitc8070e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎nginx.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ def gracefulstop(wait=True):
99
# Poll for Nginx, until it's no longer running.
1010
run('while pgrep nginx >/dev/null; do echo "Waiting for Nginx to exit.."; sleep 1; done')
1111

12+
@task
13+
defgracefulrestart():
14+
"""Gracefully shutdown and start Nginx (not reload)"""
15+
gracefulstop()
16+
start()
17+
1218
@task
1319
defdisable_vhost(vhost_filename):
1420
"""Disable a vhost by removing its symlink from /etc/nginx/sites-enabled"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp