]> git.proxmox.com Git - ceph.git/blame - ceph/debian/ceph-common.postrm
update ceph source to reef 18.2.1
[ceph.git] / ceph / debian / ceph-common.postrm
CommitLineData
7c673cae
FG
1#!/bin/sh
2# postrm script for ceph-common
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <postrm> `remove'
10# * <postrm> `purge'
11# * <old-postrm> `upgrade' <new-version>
12# * <new-postrm> `failed-upgrade' <old-version>
13# * <new-postrm> `abort-install'
14# * <new-postrm> `abort-install' <old-version>
15# * <new-postrm> `abort-upgrade' <old-version>
16# * <disappearer's-postrm> `disappear' <overwriter>
17# <overwriter-version>
18# for details, see http://www.debian.org/doc/debian-policy/ or
19# the debian-policy package
20
21
22case "$1" in
23 remove)
24 ;;
25
26 purge)
11fdf7f2
TL
27 [ -f "/etc/default/ceph" ] && . /etc/default/ceph
28 [ -z "$SERVER_USER" ] && SERVER_USER=ceph
29
30 rm -rf /var/log/ceph
31 rm -rf /etc/ceph
32
33 if [ -f /etc/shadow ]; then
34 usermod -L -e 1 $SERVER_USER
35 else
36 usermod -L $SERVER_USER
37 fi
7c673cae
FG
38 ;;
39
40 upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
41 ;;
42
43 *)
44 echo "postrm called with unknown argument \`$1'" >&2
45 exit 1
46 ;;
47esac
48
49# dh_installdeb will replace this with shell code automatically
50# generated by other debhelper scripts.
51
52#DEBHELPER#
53
54exit 0
55
56