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

Commite7f7f10

Browse files
committed
Merge pull requestalphagov#52 from alphagov/nginx_gracefulrestart
Add nginx.gracefulrestart
2 parents32f06f6 +c8070e8 commite7f7f10

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