Code

Rename check-mk-web to check-mk-multisite
[pkg-check_mk.git] / debian / check-mk-multisite.postinst
1 #!/bin/bash
3 set -e
5 . /usr/share/debconf/confmodule
7 setperm() {
8     local user="$1"
9     local group="$2"
10     local mode="$3"
11     local file="$4"
12     shift 4
13     # only do something when no setting exists
14     if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
15         chown "$user":"$group" "$file"
16         chmod "$mode" "$file"
17     fi
18 }
20 case "$1" in
21     configure)
22         # explicitly set permissions on some files
23         setperm www-data www-data 770 /var/lib/check_mk/web
24     ;;
25     abort-upgrade|abort-remove|abort-deconfigure)
26     ;;
27     *)
28         echo "postinst called with unknown argument \$1'" >&2
29         exit 1
30     ;;
31 esac