Reload nginx instead of restarting
If the restart of nginx fails (e.g. address already in use), the service will not reload the configuration which is usually not wanted. By using nginx(1) and telling it explicitly to reload the configuration, these issues do not appear.
This commit is contained in:
parent
97def4c99f
commit
09a0deaca8
|
@ -228,6 +228,10 @@ deploy {
|
|||
name = "nginx | Create DH parameters"
|
||||
command = "openssl dhparam -out /etc/nginx/dhparams.pem 2048 creates=/etc/nginx/dhparams.pem"
|
||||
}
|
||||
tasks {
|
||||
name = "nginx | Start service"
|
||||
service = "name=nginx state=started"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,8 +248,8 @@ restart {
|
|||
hosts = "tusd"
|
||||
name = "Restart nginx"
|
||||
tasks {
|
||||
action = "service name=nginx state=restarted"
|
||||
name = "nginx | Restart"
|
||||
name = "nginx | Reload configuration"
|
||||
command = "nginx -s reload"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue