Simplifies the check for installed nginx, fixes purge when nginx was not used.

pull/407/head 738
damencho 9 years ago
parent b6cb424720
commit 1bb5188ac8
  1. 4
      debian/jitsi-meet.postinst
  2. 2
      debian/jitsi-meet.postrm

@ -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

@ -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)

Loading…
Cancel
Save