Date | Commit message (Collapse) |
|
Rework the "upgrade" target to only read the PID files once to
avoid misreading the wrong PID files in the middle of the
upgrade.
Additionally, introduce the UPGRADE_DELAY environment parameter
so users can increase/decrease according to their application
startup time.
PID files are inherently racy and people should be using a
process manager (systemd or similar) instead, but this should
mitigate most of the problems with the old target.
While we're at it, add LSB tags for systems which complain
about the lack of them and modernize things a bit using
$(command) construct instead of the more fragile `command`.
Thanks-to: Jesper Rønn-Jensen <jesperrr@gmail.com>
|
|
This makes the user (sysadmin in this case) more aware if the
upgrade fails or doesn't work as intended. This change could be
more useful for Rainbows! with its long-running responses.
|
|
|
|
This may be used as a basis of other scripts so we need
to stash $1 before we "set -u"
|
|
It's too simple of a script and causes running the init script
with zero arguments to fail instead of printing out the usage
message.
|
|
This was done in Bourne shell because it's easier for UNIX
sysadmins who don't know Ruby to understand and modify.
Additionally, it can be used for nginx or anything else
that shares compatible signal handling.
|