From 13d50734167239702b7fe5059a61b5214862e4e1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 24 Apr 2018 17:17:27 +0200 Subject: [PATCH] [fix] postrm is called in a lot of various way, deleting the installed flag when it shouldnt --- debian/postrm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/postrm b/debian/postrm index cf2b6afe7..93338c4ff 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,12 +1,19 @@ #!/bin/bash +# See https://manpages.debian.org/testing/dpkg-dev/deb-postrm.5.en.html +# to understand when / how this script is called... + set -e if [ "$1" = "purge" ]; then update-rc.d yunohost-firewall remove >/dev/null + rm -f /etc/yunohost/installed +fi + +if [ "$1" = "remove" ]; then + rm -f /etc/yunohost/installed fi -rm -f /etc/yunohost/installed #DEBHELPER#