#!/usr/bin/bash
#Comando tomado de https://github.com/albfernandez/clienteafirma-deb-package
#Se aplica sugerencia de https://github.com/gecos-team/autofirma-gecos/pull/3
#
if [ ! -f ~/.config/autofirma ]; then
	if [ "$TERM" = "dumb" ]; then 
		gtk-launch autofirma-certificados
	else
		dnie-configurador
	fi
fi
while ps ux|grep dnie-configurador|grep -v grep ; 
do
	sleep 5s
done
AUTOFIRMA_AVOID_UPDATE_CHECK=true AUTOFIRMA_DO_NOT_SEND_ANALYTICS=true \
java -DdisableSslChecks=true -Djdk.tls.maxHandshakeMessageSize=50000 -jar /usr/share/autofirma/autofirma.jar "$@"
