Paste #121409

   
pasted on 21.05.2019 16:36
  • Edit to this paste
  • Print
  • Raw
  • The following pastes replied to this paste:  # 163655
  • Show paste tree
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
PS3='Please enter your choice: '
options=("start esb" "stop esb" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "start esb")
            curl --header "Content-Type: application/json" --request POST --data '{ "delay": 20000, "period":200000 }' http://localhost:9090/job/startESB
            ;;
        "stop esb")
            curl -XGET http://localhost:9090/job/stopESB
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done
Add Comment
Author