debian/gunicorn.postinst
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | set -eu |
| 4 | |
| 5 | USER=www-data |
| 6 | GROUP=www-data |
| 7 | LOG_DIR=/var/log/gunicorn |
| 8 | |
| 9 | case "${1}" in |
| 10 | configure) |
| 11 | # Only change perms if we don't exist |
| 12 | if [ ! -d "${LOG_DIR}" ] |
| 13 | then |
| 14 | mkdir -p ${LOG_DIR} |
| 15 | chmod 755 ${LOG_DIR} |
| 16 | chown ${USER}:${GROUP} ${LOG_DIR} |
| 17 | fi |
| 18 | ;; |
| 19 | |
| 20 | abort-upgrade|abort-remove|abort-deconfigure) |
| 21 | ;; |
| 22 | |
| 23 | *) |
| 24 | echo "postinst called with unknown argument \`${1}'" >&2 |
| 25 | exit 1 |
| 26 | ;; |
| 27 | esac |
| 28 | |
| 29 | #DEBHELPER# |
| 30 | |
| 31 | exit 0 |