echos should go after debconf init
This commit is contained in:
parent
d286940d3c
commit
7631d53536
1 changed files with 16 additions and 16 deletions
30
debian/postrm
vendored
30
debian/postrm
vendored
|
@ -15,13 +15,6 @@ set -e
|
||||||
|
|
||||||
# Read and export debian specific configuration
|
# Read and export debian specific configuration
|
||||||
# Only exported variables will be passed on to gitlab app
|
# 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
|
case "$1" in
|
||||||
remove)
|
remove)
|
||||||
# This package is being removed, but its configuration has not yet
|
# 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
|
# This package has previously been removed and is now having
|
||||||
# its configuration purged from the system.
|
# 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
|
# we mimic dpkg as closely as possible, so we remove configuration
|
||||||
# files with dpkg backup extensions too:
|
# files with dpkg backup extensions too:
|
||||||
|
@ -64,14 +72,6 @@ case "$1" in
|
||||||
test -n "${gitlab_yml}" && ucfr --purge gitlab ${gitlab_yml}
|
test -n "${gitlab_yml}" && ucfr --purge gitlab ${gitlab_yml}
|
||||||
fi
|
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
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue