echos should go after debconf init
This commit is contained in:
parent
d286940d3c
commit
7631d53536
1 changed files with 16 additions and 16 deletions
32
debian/postrm
vendored
32
debian/postrm
vendored
|
@ -15,13 +15,6 @@ set -e
|
|||
|
||||
# Read and export debian specific configuration
|
||||
# Only exported variables will be passed on to gitlab app
|
||||
echo "Reading gitlab-debian.conf..."
|
||||
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
|
||||
test -f ${gitlab_debian_conf} && export $(cat ${gitlab_debian_conf})
|
||||
nginx_site="/etc/nginx/sites-available/${GITLAB_HOST}"
|
||||
|
||||
test -f ${nginx_site} && echo "Found nginx site configuration at ${nginx_site}..."
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
# This package is being removed, but its configuration has not yet
|
||||
|
@ -37,6 +30,21 @@ case "$1" in
|
|||
# This package has previously been removed and is now having
|
||||
# its configuration purged from the system.
|
||||
:
|
||||
# purge debconf questions
|
||||
if [ -e /usr/share/debconf/confmodule ]; then
|
||||
# Source debconf library.
|
||||
. /usr/share/debconf/confmodule
|
||||
# Remove my changes to the db.
|
||||
db_purge
|
||||
fi
|
||||
|
||||
echo "Reading gitlab-debian.conf..."
|
||||
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
|
||||
test -f ${gitlab_debian_conf} && export $(cat ${gitlab_debian_conf})
|
||||
nginx_site="/etc/nginx/sites-available/${GITLAB_HOST}"
|
||||
|
||||
test -f ${nginx_site} && echo "Found nginx site configuration at ${nginx_site}..."
|
||||
|
||||
|
||||
# we mimic dpkg as closely as possible, so we remove configuration
|
||||
# files with dpkg backup extensions too:
|
||||
|
@ -64,15 +72,7 @@ case "$1" in
|
|||
test -n "${gitlab_yml}" && ucfr --purge gitlab ${gitlab_yml}
|
||||
fi
|
||||
|
||||
# purge debconf questions
|
||||
if [ -e /usr/share/debconf/confmodule ]; then
|
||||
# Source debconf library.
|
||||
. /usr/share/debconf/confmodule
|
||||
# Remove my changes to the db.
|
||||
db_purge
|
||||
fi
|
||||
|
||||
# cleanup complete
|
||||
# cleanup complete
|
||||
exit 0
|
||||
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue