Skip to content

Commit

Permalink
Merge pull request #5 from mysteriumnetwork/fix/backup-script
Browse files Browse the repository at this point in the history
Cleanup Dockerfile
  • Loading branch information
redhatua authored Mar 31, 2023
2 parents 8ab7bbd + 0423caa commit d622ade
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ RUN chmod 600 /root/.pgpass
#Copying script file
USER root
#switching the user to give elevated access to the commands being executed from the k8s cron job
CMD sh /home/root/backup.sh
CMD bash /home/root/backup.sh
2 changes: 1 addition & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if [ -n "$HEARTBEAT_URL" ]; then
# shellcheck disable=SC2034
MAX_RETRIES=5
CURRENT=0
while [[ -z "$HTTP_CODE" || $CURRENT -lt $MAX_RETRIES ]]; do
while [[ -z "$HTTP_CODE" || "$CURRENT" -lt "$MAX_RETRIES" ]]; do
HTTP_CODE=$(curl --silent --write-out "%{http_code}" --output /dev/null "$HEARTBEAT_URL")
if [ "$HTTP_CODE" -eq "$SUCCESS_HTTP_CODE" ]; then exit 0; fi
sleep $((2 ** "$CURRENT"))
Expand Down

0 comments on commit d622ade

Please sign in to comment.