Remove oracle_funcs.sh for RSC
This commit is contained in:
30
rsc_ops.sh
30
rsc_ops.sh
@@ -8,7 +8,35 @@
|
||||
#--------------------------------------------------------------------------------------------------------
|
||||
|
||||
MYDIR="$(dirname "$(realpath "$0")")"
|
||||
#source $MYDIR/rbk_api.conf
|
||||
source $MYDIR/rbk_api.conf
|
||||
|
||||
# Set DATE command based on OS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
DATE=gdate
|
||||
else
|
||||
DATE=date
|
||||
fi
|
||||
|
||||
# Utility functions
|
||||
exit_with_error () {
|
||||
rm -f /tmp/rbkresponse.$$
|
||||
echo Aborting Script!
|
||||
exit 1
|
||||
}
|
||||
|
||||
cleanup () {
|
||||
rm -f /tmp/mountedDBs.$$
|
||||
rm -f /tmp/rbkresponse.$$
|
||||
rm -f /tmp/payload.$$
|
||||
}
|
||||
|
||||
check_http_error () {
|
||||
# All good responses start with a 2
|
||||
if [ ${http_response:0:1} != "2" ]; then
|
||||
echo FATAL: HTTP error from API call: $http_response. The server responded with:
|
||||
cat /tmp/rbkresponse.$$ ; echo ; exit_with_error
|
||||
fi
|
||||
}
|
||||
|
||||
check_get_rsc_token () {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user