Scott Baker | 4b37d1a | 2016-07-01 13:41:52 -0700 | [diff] [blame] | 1 | #! /bin/bash |
2 | |||||
3 | display_usage() { | ||||
4 | echo -e "\nUsage:\n$0 [xos-listen-port] \n" | ||||
5 | } | ||||
6 | |||||
7 | if [ $# -lt 1 ] | ||||
8 | then | ||||
9 | display_usage | ||||
10 | exit 1 | ||||
11 | fi | ||||
12 | |||||
13 | echo "Sending rebuild request to XOS" | ||||
14 | STATUS=`curl -X POST 0.0.0.0:$1/api/utility/onboarding/xos/rebuild/ 2> /dev/null` | ||||
15 | if [[ "$STATUS" != "true" ]]; then | ||||
16 | echo "Rebuild request failed" | ||||
17 | exit -1 | ||||
18 | fi | ||||
19 | |||||
20 | echo "Rebuild request accepted" | ||||
21 |