Skip to content
Snippets Groups Projects

Added rpc_status.sh

  • Added script for check if Perun RPC is available

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User
  • Ghost User
  • Ghost User
    Ghost User @ghost started a thread on commit f0674752
  • 11 DOMAIN=""
    12
    13 # Valid userId - This id will be used in getUSerById call
    14 USER_ID=""
    15
    16 # eduPersonPrincipalName which will be searched
    17 URL="https://${DOMAIN}/rpc/json/usersManager/getUserById?id=${USER_ID}"
    18
    19 START_TIME=$(date +%s%N)
    20 RPC_RESULT=$(timeout 10 curl --user ${USER}:${PASSWORD} ${URL} 2>&1)
    21 END_TIME=$(date +%s%N)
    22 TOTAL_TIME=$(echo "scale=4;$(expr ${END_TIME} - ${START_TIME}) / 1000000000" | bc -l)
    23 if [[ $RPC_RESULT == *\"id\":${USER_ID}* ]]; then
    24 echo "0 rpc_status total_time=${TOTAL_TIME} OK"
    25 else
    26 echo "2 rpc_status total_time=${TOTAL_TIME} ${RPC_RESULT}"
  • Pavel Vyskočil
    Pavel Vyskočil @445753 started a thread on commit f0674752
  • 11 DOMAIN=""
    12
    13 # Valid userId - This id will be used in getUSerById call
    14 USER_ID=""
    15
    16 # eduPersonPrincipalName which will be searched
    17 URL="https://${DOMAIN}/rpc/json/usersManager/getUserById?id=${USER_ID}"
    18
    19 START_TIME=$(date +%s%N)
    20 RPC_RESULT=$(timeout 10 curl --user ${USER}:${PASSWORD} ${URL} 2>&1)
    21 END_TIME=$(date +%s%N)
    22 TOTAL_TIME=$(echo "scale=4;$(expr ${END_TIME} - ${START_TIME}) / 1000000000" | bc -l)
    23 if [[ $RPC_RESULT == *\"id\":${USER_ID}* ]]; then
    24 echo "0 rpc_status total_time=${TOTAL_TIME} OK"
    25 else
    26 echo "2 rpc_status total_time=${TOTAL_TIME} ${RPC_RESULT}"
  • Ghost User approved this merge request

    approved this merge request

  • :tada: This MR is included in version 1.0.0 :tada:

    The release is available on:

    Your semantic-release bot :package: :rocket:

  • Please register or sign in to reply
    Loading