about summary refs log tree commit homepage
path: root/examples/init.sh
DateCommit message (Collapse)
2016-06-07examples/init.sh: update to reduce upgrade raciness jr/init
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>
2010-06-10examples/init: "upgrade" task waits for completion
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.
2010-02-08examples/init.sh: add "reopen-logs" target
2010-02-08examples/init.sh: reenable set -u
This may be used as a basis of other scripts so we need to stash $1 before we "set -u"
2009-10-09examples/init.sh: remove "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.
2009-04-29Add example init script
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.