Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / debian / ceph-mgr.postinst
1 #!/bin/sh
2 # vim: set noet ts=8:
3 # postinst script for ceph-mgr
4 #
5 # see: dh_installdeb(1)
6
7 set -e
8
9 # summary of how this script can be called:
10 #
11 #       postinst configure <most-recently-configured-version>
12 #       old-postinst abort-upgrade <new-version>
13 #       conflictor's-postinst abort-remove in-favour <package> <new-version>
14 #       postinst abort-remove
15 #       deconfigured's-postinst abort-deconfigure in-favour <failed-install-package> <version> [<removing conflicting-package> <version>]
16 #
17
18 # for details, see http://www.debian.org/doc/debian-policy/ or
19 # the debian-policy package
20
21 [ -f "/etc/default/ceph" ] && . /etc/default/ceph
22 [ -z "$SERVER_USER" ] && SERVER_USER=ceph
23 [ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
24
25 case "$1" in
26     configure)
27         [ -x /sbin/start ] && start ceph-mgr-all || :
28
29         if ! dpkg-statoverride --list /var/lib/ceph/mgr >/dev/null
30         then
31             chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/mgr
32         fi
33     ;;
34     abort-upgrade|abort-remove|abort-deconfigure)
35         :
36     ;;
37
38     *)
39         echo "postinst called with unknown argument \`$1'" >&2
40         exit 1
41     ;;
42 esac
43
44 # dh_installdeb will replace this with shell code automatically
45 # generated by other debhelper scripts.
46
47 #DEBHELPER#
48
49 exit 0
50
51