Some UX changes
This commit is contained in:
parent
fef572359f
commit
e09ff8f7b9
|
@ -1,7 +1,7 @@
|
|||
BASEPATH=$(dirname $(realpath $0))
|
||||
. $BASEPATH/.env
|
||||
AUTH_TOKEN=$(echo $(curl --request POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --data-urlencode client_id=sipgate-app-web --data-urlencode grant_type=password --data-urlencode username=$SIPUSER --data-urlencode password=$SIPPWD https://api.sipgate.com/login/sipgate-apps/protocol/openid-connect/token -s | jq '.access_token') | sed 's/\"//g')
|
||||
if [ -z "$AUTH_TOKEN" ];
|
||||
if [ -z "$AUTH_TOKEN" ] || [ $AUTH_TOKEN = "null" ];
|
||||
then
|
||||
echo "Login failed"
|
||||
else
|
||||
|
|
|
@ -51,11 +51,14 @@ OUTFILE="$DATE-$ID-report.pdf"
|
|||
if [ -z $FILE ]
|
||||
then
|
||||
echo "Fax seems not to be sent successfully (yet). No report available"
|
||||
if [ $DF = true ]
|
||||
then
|
||||
read -p "Delete id from history anyways? (y/n) " DIN
|
||||
if [[ $DF = true && $DIN =~ [yYjJ] ]]
|
||||
if [ $DIN =~ [yYjJ] ]
|
||||
then
|
||||
echo "$(grep -v "^$ID$" $BASEPATH/.fax_history)" > $BASEPATH/.fax_history
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
if [ $PF = false ]
|
||||
|
|
Loading…
Reference in a new issue