"Fossies" - the Fresh Open Source Software Archive

Member "install/delete.sh" (9 Feb 2022, 2043 Bytes) of package /linux/privat/benno-smtp-2.8.0.tgz:


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 and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "delete.sh": 2.6.0_vs_2.8.0.

    1 #!/bin/sh
    2 # postrm script for benno-lib
    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 
   22 case "$1" in
   23     purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
   24         # Debian package "base-files" has created /opt and /srv in postinstall
   25         # script, thus this dirs will not appear as system directories.
   26         # They will be removed if no other package referenced to it in
   27         # .../info/*.list
   28         #test -d /opt || mkdir /opt
   29         #test -d /srv || mkdir /srv
   30     ;;
   31 
   32     *)
   33         echo "postrm called with unknown argument \`$1'" >&2
   34         exit 1
   35     ;;
   36 esac
   37 
   38 # dh_installdeb will replace this with shell code automatically
   39 # generated by other debhelper scripts.
   40 
   41 # Automatically added by dh_installinit/13.3.4
   42 if [ "$1" = "purge" ] ; then
   43     update-rc.d benno-smtp remove >/dev/null
   44 fi
   45 # End automatically added section
   46 # Automatically added by dh_systemd_start/13.3.4
   47 if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
   48     systemctl --system daemon-reload >/dev/null || true
   49 fi
   50 # End automatically added section
   51 # Automatically added by dh_systemd_enable/13.3.4
   52 if [ "$1" = "remove" ]; then
   53     if [ -x "/usr/bin/deb-systemd-helper" ]; then
   54         deb-systemd-helper mask 'benno-smtp.service' >/dev/null || true
   55     fi
   56 fi
   57 
   58 if [ "$1" = "purge" ]; then
   59     if [ -x "/usr/bin/deb-systemd-helper" ]; then
   60         deb-systemd-helper purge 'benno-smtp.service' >/dev/null || true
   61         deb-systemd-helper unmask 'benno-smtp.service' >/dev/null || true
   62     fi
   63 fi
   64 # End automatically added section
   65 
   66 
   67 exit 0