#!/bin/bash

now=$(date +%d-%m-%Y\ %T.%3N)

RED='\033[1;31m'
YEL='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

LOG_FILE=/var/log/eta.log

print_output() {
  now=$(date +%d-%m-%Y\ %T.%3N)
  echo -e "${NC}$now $1" >> $LOG_FILE
}


print_output "${YEL}$0${NC}"
u=$(/usr/bin/whoami)
print_output "${YEL}$0${NC} : running as ${YEL}$u${NC}"

print_output "${YEL}$0${NC} : removing credentials under /tmp ${NC}"
rm -rf /tmp/.etap_cr