10 lines
315 B
Bash
Executable file
10 lines
315 B
Bash
Executable file
BASEPATH=$(dirname $(realpath $0))
|
|
. $BASEPATH/.env
|
|
AUTH_TOKEN=$(curl -o /dev/null -s -w "%{http_code}\n" --request GET --header 'Accept: application/json' --user $SIPUSER:$SIPPWD https://api.sipgate.com/v2/authorization/userinfo -s)
|
|
if [ $AUTH_TOKEN = "200" ];
|
|
then
|
|
echo "Login OK"
|
|
else
|
|
echo "Login failed"
|
|
fi
|