Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > e247b185e3e6be727ee0cf8bf6a97d6e > scriptlet

italc-master-3.0.3-3.mga7.armv7hl.rpm

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