mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
53 lines
1.4 KiB
Bash
Executable file
53 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
# postinst script for athena-server
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <postinst> `abort-remove'
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# 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
|