Переглянути джерело

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

j8
damencho 9 роки тому
джерело
коміт
1bb5188ac8
2 змінених файлів з 4 додано та 2 видалено
  1. 2
    2
      debian/jitsi-meet.postinst
  2. 2
    0
      debian/jitsi-meet.postrm

+ 2
- 2
debian/jitsi-meet.postinst Переглянути файл

45
         # stores the hostname so we will reuse it later, like in purge
45
         # stores the hostname so we will reuse it later, like in purge
46
         db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
46
         db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
47
 
47
 
48
-        NGINX_INSTALL_CHECK="$(dpkg-query -W -f '${PackageSpec}:${Status}\n' nginx 2>&1 | grep -v "ok installed" || :)"
49
-        if [ -z "${NGINX_INSTALL_CHECK}" ]; then
48
+        NGINX_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'nginx' 2>/dev/null | awk '{print $3}' || true)"
49
+        if [ "$NGINX_INSTALL_CHECK" = "installed" ] || [ "$NGINX_INSTALL_CHECK" = "unpacked" ] ; then
50
             FORCE_NGINX="true"
50
             FORCE_NGINX="true"
51
         fi
51
         fi
52
 
52
 

+ 2
- 0
debian/jitsi-meet.postrm Переглянути файл

35
             rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
35
             rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
36
             rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
36
             rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
37
             rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
37
             rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
38
+            rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.jks
39
+            rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.p12
38
         fi
40
         fi
39
     ;;
41
     ;;
40
     upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
42
     upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

Завантаження…
Відмінити
Зберегти