POSTIN
/bin/sh
if
getent group italc >/dev/null
then
: OK group italc already present
else
groupadd -r italc 2>/dev/null || :
fi
# dont run scripts on update
if [ ${1:-0} -lt 2 ]; then
# the imc command tries to start its Qt GUI if $DISPLAY is set...
if [ ! -z ${DISPLAY+x} ]; then
remembered_DISPLAY=$DISPLAY
fi
unset DISPLAY
for role in admin supporter teacher; do
if [ ! -f "/etc/italc/keys/private/$role/key" ]; then
/usr/bin/imc -role $role -createkeypair "/etc/italc/keys" >/dev/null
chgrp italc "/etc/italc/keys/private/$role/key"
chmod 0440 "/etc/italc/keys/private/$role/key"
fi
done
if [ ! -z "${remembered_DISPLAY+x}" ]; then
DISPLAY=$remembered_DISPLAY
fi
fi