challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

challenger-httpd.postinst (785B)


      1 #!/bin/bash
      2 
      3 set -e
      4 
      5 CHALLENGER_HOME="/var/lib/challenger/"
      6 
      7 . /usr/share/debconf/confmodule
      8 
      9 case "${1}" in
     10 configure)
     11   # Creating taler users if needed
     12     if ! getent passwd challenger-httpd >/dev/null
     13     then
     14         adduser --quiet --system --ingroup www-data --no-create-home --home ${CHALLENGER_HOME} challenger-httpd
     15     fi
     16 
     17   # Try to generate compressed versions of the SPA
     18   for n in index.css index.js main.css index.html
     19   do
     20       TDIR="/usr/share/challenger/"
     21       gzip --best - < "${TDIR}/spa/$n" > "${TDIR}/spa/$n.gz" || true
     22       zstd -19 - < "${TDIR}/spa/$n" > "${TDIR}/spa/$n.zstd" || true
     23   done
     24   ;;
     25 
     26 abort-upgrade | abort-remove | abort-deconfigure) ;;
     27 
     28   *)
     29   echo "postinst called with unknown argument \`${1}'" >&2
     30   exit 1
     31   ;;
     32 esac
     33 
     34 #DEBHELPER#
     35 
     36 exit 0