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

This commit is contained in:
damencho 2015-11-09 16:26:13 -06:00
parent b6cb424720
commit 1bb5188ac8
2 changed files with 4 additions and 2 deletions

View File

@ -45,8 +45,8 @@ case "$1" in
# stores the hostname so we will reuse it later, like in purge # stores the hostname so we will reuse it later, like in purge
db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME 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" || :)" NGINX_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'nginx' 2>/dev/null | awk '{print $3}' || true)"
if [ -z "${NGINX_INSTALL_CHECK}" ]; then if [ "$NGINX_INSTALL_CHECK" = "installed" ] || [ "$NGINX_INSTALL_CHECK" = "unpacked" ] ; then
FORCE_NGINX="true" FORCE_NGINX="true"
fi fi

View File

@ -35,6 +35,8 @@ case "$1" in
rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
rm -f /etc/nginx/sites-enabled/$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 fi
;; ;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)