Created
April 8, 2015 16:41
-
-
Save zoltrain/0585f7e1e3ca7b5f5e2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
case "$1" in | |
configure) | |
# logic common to all installs/upgrades | |
# if $2 is set, this is an upgrade | |
if ( [ -n "$2" ] && [ "$RESTART_ON_UPGRADE" = "true" ] ) ; then | |
# restart a service | |
fi | |
;; | |
triggered) | |
# logic when this script is triggered by another package install | |
# maybe a binary has changed? | |
if ( [ -n "$2" ] == “redis-binary-upgrade”) ; then | |
# restart a service | |
fi | |
;; | |
abort-upgrade|abort-remove|abort-deconfigure) | |
# handle package installation failure | |
;; | |
*) | |
echo "$APP_NAME $0 called with unknown argument '$1'" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment