HP/UX fixes
This commit is contained in:
@@ -21,7 +21,6 @@ get_short_hostname() {
|
||||
}
|
||||
HOST=$(get_short_hostname)
|
||||
|
||||
|
||||
# Detect OS and set DATE variable appropriately
|
||||
os_name=$(uname -s)
|
||||
case "$os_name" in
|
||||
@@ -50,28 +49,24 @@ echo "`$DATE` -$$-: CALLED $0 $@" >> $LOGFILE
|
||||
|
||||
trap ctrl_c INT
|
||||
|
||||
|
||||
ctrl_c() {
|
||||
echo "`$DATE` -$$-: TRAPPED CTRL-C - EXITING" >> $LOGFILE
|
||||
exit_with_error
|
||||
}
|
||||
|
||||
|
||||
ctrl_c_inhibit() {
|
||||
echo "`$DATE` -$$-: TRAPPED CTRL-C - CONTINUING" >> $LOGFILE
|
||||
}
|
||||
|
||||
exit_with_error() {
|
||||
# if [ $usingsatoken ]; then
|
||||
# ENDPOINT="https://$RUBRIK_IP/api/internal/session/me"
|
||||
# rest_api_delete
|
||||
# check_http_error
|
||||
# fi
|
||||
ENDPOINT="https://$RUBRIK_IP/api/v1/session/me"
|
||||
rest_api_delete
|
||||
check_http_error
|
||||
|
||||
cat /tmp/rbkresponse.$$ | mailx -s "Backup error on ${HOST} for ${ORACLE_SID}. Please investigate" $ALERT_EMAILS
|
||||
#rm -f /tmp/rbkresponse.$$
|
||||
rm -f /tmp/rbkresponse.$$
|
||||
rm -f /tmp/mountedDBs.$$
|
||||
rm -f $PIDFILE
|
||||
rm -f $PIDFILE
|
||||
echo Aborting Script!
|
||||
echo "`$DATE` -$$-: EXITED WITH ERROR $0 $@" >> $LOGFILE
|
||||
exit 1
|
||||
@@ -301,12 +296,9 @@ close_mv() {
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
# if [ $usingsatoken ]; then
|
||||
# ENDPOINT="https://$RUBRIK_IP/api/internal/session/me"
|
||||
# rest_api_delete
|
||||
# fi
|
||||
echo "`$DATE` -$$-: EXITED $0 $@" >> $LOGFILE
|
||||
#rm -f /tmp/mountedDBs.$$
|
||||
#rm -f /tmp/rbkresponse.$$
|
||||
ENDPOINT="https://$RUBRIK_IP/api/v1/session/me"
|
||||
rest_api_delete
|
||||
echo "`$DATE` -$$-: EXITED $0 $@" >> $LOGFILE
|
||||
rm -f /tmp/rbkresponse.$$
|
||||
rm -f $PIDFILE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user