22 lines
600 B
Bash
Executable File
22 lines
600 B
Bash
Executable File
#!/bin/bash
|
|
while true; do
|
|
source .env 2> /dev/null
|
|
|
|
# Get current date and time
|
|
CURRENT_TIME=$(date -u '+%Y-%m-%dT%H:%M:%S.%3NZ')
|
|
|
|
# Make the keep-alive request
|
|
KEEP_ALIVE=$(curl -s 'https://faisanet.mib.com.mv/aProfile/keepAlive' \
|
|
-X 'POST' \
|
|
-H "cookie: ql_0=${QL_0}; IBSID=${IBSID}")
|
|
|
|
# Remove the last closing brace from KEEP_ALIVE
|
|
KEEP_ALIVE_MODIFIED=${KEEP_ALIVE%?}
|
|
|
|
# Combine timestamp with the keep-alive response
|
|
echo "$KEEP_ALIVE_MODIFIED, \"timestamp\":\"$CURRENT_TIME\"}"
|
|
|
|
# Sleep for the specified duration
|
|
sleep $SLEEP
|
|
done
|