Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 7a85e33e8499c7a83950a3171d75457d > scriptlet

italc-master-3.0.3-3.1.mga7.x86_64.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