"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-4445/debian/jitsi-meet-prosody.postrm" (30 Sep 2020, 2222 Bytes) of package /linux/misc/jitsi-meet-4445.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "jitsi-meet-prosody.postrm": 4433_vs_4434.

    1 #!/bin/sh
    2 # postrm script for jitsi-meet-prosody
    3 #
    4 # see: dh_installdeb(1)
    5 
    6 set -e
    7 
    8 # summary of how this script can be called:
    9 #        * <postrm> `remove'
   10 #        * <postrm> `purge'
   11 #        * <old-postrm> `upgrade' <new-version>
   12 #        * <new-postrm> `failed-upgrade' <old-version>
   13 #        * <new-postrm> `abort-install'
   14 #        * <new-postrm> `abort-install' <old-version>
   15 #        * <new-postrm> `abort-upgrade' <old-version>
   16 #        * <disappearer's-postrm> `disappear' <overwriter>
   17 #          <overwriter-version>
   18 # for details, see http://www.debian.org/doc/debian-policy/ or
   19 # the debian-policy package
   20 
   21 # Load debconf
   22 . /usr/share/debconf/confmodule
   23 
   24 
   25 case "$1" in
   26     remove)
   27         if [ -x "/etc/init.d/prosody" ]; then
   28             invoke-rc.d prosody reload || true
   29         fi
   30     ;;
   31 
   32     purge)
   33         db_get jitsi-meet-prosody/jvb-hostname
   34         JVB_HOSTNAME=$RET
   35         if [ -n "$RET" ]; then
   36             rm -f /etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua
   37             rm -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua
   38 
   39             JICOFO_AUTH_DOMAIN="auth.$JVB_HOSTNAME"
   40             # clean up generated certificates
   41             rm -f /etc/prosody/certs/$JVB_HOSTNAME.crt
   42             rm -f /etc/prosody/certs/$JVB_HOSTNAME.key
   43             rm -f /etc/prosody/certs/$JICOFO_AUTH_DOMAIN.crt
   44             rm -f /etc/prosody/certs/$JICOFO_AUTH_DOMAIN.key
   45             rm -rf /var/lib/prosody/$JICOFO_AUTH_DOMAIN.*
   46             rm -rf /var/lib/prosody/$JVB_HOSTNAME.*
   47 
   48             # clean created users, replace '.' with '%2e', replace '-' with '%2d'
   49             rm -rf /var/lib/prosody/`echo $JICOFO_AUTH_DOMAIN | sed -e "s/\./%2e/g"| sed -e "s/-/%2d/g"`
   50 
   51             # clean the prosody cert from the trust store
   52             rm -rf /usr/local/share/ca-certificates/$JICOFO_AUTH_DOMAIN.*
   53             update-ca-certificates -f
   54         fi
   55 
   56         # Clear the debconf variable
   57         db_purge
   58     ;;
   59 
   60     upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
   61     ;;
   62 
   63     *)
   64         echo "postrm called with unknown argument \`$1'" >&2
   65         exit 1
   66     ;;
   67 esac
   68 
   69 # dh_installdeb will replace this with shell code automatically
   70 # generated by other debhelper scripts.
   71 
   72 #DEBHELPER#
   73 
   74 db_stop
   75 
   76 exit 0