From 1bb5188ac851ecd96b65634858c1a0e108d3c946 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 9 Nov 2015 16:26:13 -0600 Subject: [PATCH] Simplifies the check for installed nginx, fixes purge when nginx was not used. --- debian/jitsi-meet.postinst | 4 ++-- debian/jitsi-meet.postrm | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/jitsi-meet.postinst b/debian/jitsi-meet.postinst index 125978243d..fdf38ccccb 100644 --- a/debian/jitsi-meet.postinst +++ b/debian/jitsi-meet.postinst @@ -45,8 +45,8 @@ case "$1" in # stores the hostname so we will reuse it later, like in purge db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME - NGINX_INSTALL_CHECK="$(dpkg-query -W -f '${PackageSpec}:${Status}\n' nginx 2>&1 | grep -v "ok installed" || :)" - if [ -z "${NGINX_INSTALL_CHECK}" ]; then + NGINX_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'nginx' 2>/dev/null | awk '{print $3}' || true)" + if [ "$NGINX_INSTALL_CHECK" = "installed" ] || [ "$NGINX_INSTALL_CHECK" = "unpacked" ] ; then FORCE_NGINX="true" fi diff --git a/debian/jitsi-meet.postrm b/debian/jitsi-meet.postrm index 3e199f81e1..807dc38cbd 100644 --- a/debian/jitsi-meet.postrm +++ b/debian/jitsi-meet.postrm @@ -35,6 +35,8 @@ case "$1" in rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf + rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.jks + rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 fi ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)