#!/bin/sh # postinst script for athena-server # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) ldconfig -n /opt/athena/lib adduser --system --quiet --gecos "Project Athena" --home /var/lib/athena --group --no-create-home athena mkdir -p /var/lib/athena chown athena:athena /var/lib/athena chmod 775 /var/lib/athena if [ ! -d "/var/lib/athena/default" ]; then /opt/athena/new-server default 40100 systemctl enable athena-server@default.target systemctl start athena-server@default.target fi ;; abort-remove|abort-deconfigure) ldconfig -n /opt/athena/lib ;; abort-upgrade) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0