/
sogo.postinst
42 lines (33 loc) · 1.14 KB
/
sogo.postinst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin
case "$1" in
configure)
# update timestamp on imgs,css,js to let apache know the files changed
find /usr/lib/GNUstep/SOGo/WebServerResources -exec touch {} \;
# Enforce owner+mode on configuration
chmod 750 /etc/sogo
chown root:sogo /etc/sogo
chmod 640 /etc/sogo/sogo.conf
chown root:sogo /etc/sogo/sogo.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0