forked from gem/oq-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postrm
55 lines (45 loc) · 1.57 KB
/
postrm
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
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
# postrm.skeleton
# Skeleton maintainer script showing all the possible cases.
# Written by Charles Briscoe-Smith, March-April 1998. Public Domain.
if [ $GEM_SET_DEBUG ]; then
set -x
fi
# Abort if any command returns an error value
set -e
# This script is called twice during the removal of the package; once
# after the removal of the package's files from the system, and as
# the final step in the removal of this package, after the package's
# conffiles have been removed.
GEM_DEB_PACKAGE="python3-oq-engine"
case "$1" in
remove)
# This package has been removed, but its configuration has not yet
# been purged.
:
for dir in /opt/openquake/lib/python3.6/site-packages/openquake/engine /usr/share/doc/${GEM_DEB_PACKAGE} /opt/openquake/lib/python3.6/site-packages/openquake.engine-*egg-info
do
rm -rf $dir
done
;;
purge)
if [ -e /usr/share/debconf/confmodule ]; then
# Source debconf library.
. /usr/share/debconf/confmodule
# Remove my changes to the db.
db_purge
fi
# This package has previously been removed and is now having
# its configuration purged from the system.
:
for dir in /usr/share/openquake/engine /opt/openquake/lib/python3.6/site-packages/openquake/engine /usr/share/doc/${GEM_DEB_PACKAGE} /opt/openquake/lib/python3.6/site-packages/openquake.engine-*egg-info
do
rm -rf $dir
done
rm -f /etc/openquake/openquake.cfg
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0