postinst is in civicrm-common 4.7.1+dfsg-2ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/bin/sh
set -e
case "$1" in
configure|reconfigure)
chmod o-rwx /etc/civicrm
if [ -n "$(ls -A /etc/civicrm)" ]; then
## conf dir not empty -- locking:
chmod u-w /etc/civicrm
else
## conf dir is empty -- un-locking for initial setup:
chown www-data:root /etc/civicrm
chmod u+w /etc/civicrm
fi
chown -R www-data:www-data /var/lib/civicrm || true
## drop caches on upgrade:
if [ -n "$2" ]; then
rm -rf /var/lib/civicrm/civicrm/templates_c/* || true
fi
esac
|